From e14a25e4beda119a43a3a7adc4bc73f4fa39f975 Mon Sep 17 00:00:00 2001 From: Antonio Almeida Date: Mon, 1 Feb 2021 11:52:02 +0000 Subject: [PATCH 1/6] Added prefix and suffix for column wrappers --- src/resources/views/crud/columns/inc/wrapper_end.blade.php | 2 ++ src/resources/views/crud/columns/inc/wrapper_start.blade.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/resources/views/crud/columns/inc/wrapper_end.blade.php b/src/resources/views/crud/columns/inc/wrapper_end.blade.php index 8086d7aaf2..eb765ecc8f 100644 --- a/src/resources/views/crud/columns/inc/wrapper_end.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_end.blade.php @@ -9,4 +9,6 @@ } @endphp +{{ $column['wrapper']['suffix'] }} + diff --git a/src/resources/views/crud/columns/inc/wrapper_start.blade.php b/src/resources/views/crud/columns/inc/wrapper_start.blade.php index 13baf92ee3..e4fe3b795b 100644 --- a/src/resources/views/crud/columns/inc/wrapper_start.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_start.blade.php @@ -13,4 +13,6 @@ @foreach(Arr::except($column['wrapper'], 'element') as $element => $value) {{$element}}="{{$value}}" @endforeach -> \ No newline at end of file +> + +{{ $column['wrapper']['prefix'] }} \ No newline at end of file From 80cbbe1b539135be80dc9c09520663a51636b15a Mon Sep 17 00:00:00 2001 From: Antonio Almeida Date: Mon, 1 Feb 2021 12:12:48 +0000 Subject: [PATCH 2/6] Added validation for prefix and suffix --- src/resources/views/crud/columns/inc/wrapper_end.blade.php | 2 ++ .../views/crud/columns/inc/wrapper_start.blade.php | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/resources/views/crud/columns/inc/wrapper_end.blade.php b/src/resources/views/crud/columns/inc/wrapper_end.blade.php index eb765ecc8f..51c5158f2b 100644 --- a/src/resources/views/crud/columns/inc/wrapper_end.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_end.blade.php @@ -9,6 +9,8 @@ } @endphp +@if($column['wrapper']['prefix'] ?? false) {{ $column['wrapper']['suffix'] }} +@endif diff --git a/src/resources/views/crud/columns/inc/wrapper_start.blade.php b/src/resources/views/crud/columns/inc/wrapper_start.blade.php index e4fe3b795b..a1385d132e 100644 --- a/src/resources/views/crud/columns/inc/wrapper_start.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_start.blade.php @@ -10,9 +10,11 @@ @endphp <{{ $column['wrapper']['element'] ?? 'a' }} -@foreach(Arr::except($column['wrapper'], 'element') as $element => $value) +@foreach(Arr::except($column['wrapper'], ['element', 'prefix', 'suffix']) as $element => $value) {{$element}}="{{$value}}" @endforeach > -{{ $column['wrapper']['prefix'] }} \ No newline at end of file +@if($column['wrapper']['prefix'] ?? false) +{{ $column['wrapper']['prefix'] }} +@endif \ No newline at end of file From d77c3086f089b7f1d93206f562422316e3ffae7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Almeida?= Date: Thu, 9 Sep 2021 12:12:39 +0100 Subject: [PATCH 3/6] Fix typo --- src/resources/views/crud/columns/inc/wrapper_end.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/views/crud/columns/inc/wrapper_end.blade.php b/src/resources/views/crud/columns/inc/wrapper_end.blade.php index 51c5158f2b..8f19eada41 100644 --- a/src/resources/views/crud/columns/inc/wrapper_end.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_end.blade.php @@ -9,7 +9,7 @@ } @endphp -@if($column['wrapper']['prefix'] ?? false) +@if($column['wrapper']['suffix'] ?? false) {{ $column['wrapper']['suffix'] }} @endif From cdf16a1ec835b263cffa1bbb4424b7f0acc9071d Mon Sep 17 00:00:00 2001 From: Cristian Tabacitu Date: Thu, 9 Sep 2021 11:12:53 +0000 Subject: [PATCH 4/6] Apply fixes from StyleCI [ci skip] [skip ci] --- src/BackpackServiceProvider.php | 4 +- src/Stats.php | 12 ++-- .../Commands/AddCustomRouteContent.php | 6 +- .../Console/Commands/AddSidebarContent.php | 6 +- .../Commands/PublishBackpackMiddleware.php | 6 +- src/app/Console/Commands/PublishView.php | 2 +- .../Commands/Traits/PrettyCommandOutput.php | 18 ++--- src/app/Console/Commands/Version.php | 2 +- .../Http/Controllers/Auth/LoginController.php | 2 +- .../Controllers/Auth/RegisterController.php | 6 +- .../Auth/ResetPasswordController.php | 6 +- src/app/Http/Controllers/ChartController.php | 4 +- src/app/Http/Controllers/CrudController.php | 6 +- .../Operations/BulkCloneOperation.php | 8 +-- .../Operations/BulkDeleteOperation.php | 6 +- .../Controllers/Operations/CloneOperation.php | 8 +-- .../Operations/CreateOperation.php | 6 +- .../Operations/DeleteOperation.php | 8 +-- .../Controllers/Operations/FetchOperation.php | 8 +-- .../Operations/InlineCreateOperation.php | 6 +- .../Controllers/Operations/ListOperation.php | 6 +- .../Operations/ReorderOperation.php | 6 +- .../Controllers/Operations/ShowOperation.php | 8 +-- .../Operations/UpdateOperation.php | 8 +-- src/app/Http/Middleware/CheckIfAdmin.php | 4 +- ...packAuthGuardInsteadOfDefaultAuthGuard.php | 6 +- .../Http/Requests/ChangePasswordRequest.php | 2 +- src/app/Library/CrudPanel/CrudButton.php | 32 ++++----- src/app/Library/CrudPanel/CrudColumn.php | 18 ++--- src/app/Library/CrudPanel/CrudField.php | 20 +++--- src/app/Library/CrudPanel/CrudFilter.php | 48 +++++++------- src/app/Library/CrudPanel/CrudPanel.php | 50 +++++++------- src/app/Library/CrudPanel/Traits/Access.php | 12 ++-- src/app/Library/CrudPanel/Traits/AutoSet.php | 6 +- src/app/Library/CrudPanel/Traits/Buttons.php | 46 ++++++------- src/app/Library/CrudPanel/Traits/Columns.php | 56 ++++++++-------- .../Traits/ColumnsProtectedMethods.php | 38 +++++------ src/app/Library/CrudPanel/Traits/Create.php | 20 +++--- src/app/Library/CrudPanel/Traits/Delete.php | 2 +- .../Library/CrudPanel/Traits/FakeFields.php | 12 ++-- src/app/Library/CrudPanel/Traits/Fields.php | 66 +++++++++---------- .../CrudPanel/Traits/FieldsPrivateMethods.php | 12 ++-- .../Traits/FieldsProtectedMethods.php | 28 ++++---- src/app/Library/CrudPanel/Traits/Filters.php | 50 +++++++------- .../CrudPanel/Traits/HeadingsAndTitles.php | 18 ++--- .../Library/CrudPanel/Traits/Macroable.php | 4 +- .../Library/CrudPanel/Traits/Operations.php | 14 ++-- src/app/Library/CrudPanel/Traits/Query.php | 20 +++--- src/app/Library/CrudPanel/Traits/Read.php | 6 +- .../CrudPanel/Traits/Relationships.php | 14 ++-- src/app/Library/CrudPanel/Traits/Reorder.php | 6 +- .../Library/CrudPanel/Traits/SaveActions.php | 28 ++++---- src/app/Library/CrudPanel/Traits/Search.php | 38 +++++------ src/app/Library/CrudPanel/Traits/Settings.php | 26 ++++---- src/app/Library/CrudPanel/Traits/Tabs.php | 2 +- src/app/Library/CrudPanel/Traits/Update.php | 10 +-- .../Library/CrudPanel/Traits/Validation.php | 10 +-- src/app/Library/CrudPanel/Traits/Views.php | 22 +++---- src/app/Library/Widget.php | 8 +-- src/app/Models/Traits/HasFakeFields.php | 4 +- .../Models/Traits/HasRelationshipFields.php | 6 +- src/app/Models/Traits/HasUploadFields.php | 16 ++--- .../SpatieTranslatable/HasTranslations.php | 12 ++-- .../Traits/SpatieTranslatable/SlugService.php | 10 +-- .../Traits/SpatieTranslatable/Sluggable.php | 12 ++-- .../SpatieTranslatable/SluggableObserver.php | 18 ++--- .../SluggableScopeHelpers.php | 12 ++-- src/helpers.php | 4 +- tests/Unit/CrudPanel/BaseDBCrudPanelTest.php | 6 +- 69 files changed, 506 insertions(+), 506 deletions(-) diff --git a/src/BackpackServiceProvider.php b/src/BackpackServiceProvider.php index 6c45c03350..eefae4b259 100644 --- a/src/BackpackServiceProvider.php +++ b/src/BackpackServiceProvider.php @@ -141,7 +141,7 @@ public function publishFiles() /** * Define the routes for the application. * - * @param \Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * * @return void */ @@ -161,7 +161,7 @@ public function setupRoutes(Router $router) /** * Load custom routes file. * - * @param \Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * * @return void */ diff --git a/src/Stats.php b/src/Stats.php index 1643de8501..544576da48 100644 --- a/src/Stats.php +++ b/src/Stats.php @@ -82,9 +82,9 @@ private function sendUsageStats() * It spins up a separate process for this, and doesn't listen for a reponse, * so it has minimal to no impact on pageload. * - * @param string $method HTTP Method to use for the request. - * @param string $url URL to point the request at. - * @param array $payload The data you want sent to the URL. + * @param string $method HTTP Method to use for the request. + * @param string $url URL to point the request at. + * @param array $payload The data you want sent to the URL. * * @return void */ @@ -107,9 +107,9 @@ private function makeCurlRequest($method, $url, $payload) * geographic location this is usually slower than CURL. However, * unlike CURL, it works on most machines, so it's reliable. * - * @param string $method HTTP Method to use for the request. - * @param string $url URL to point the request at. - * @param array $payload The data you want sent to the URL. + * @param string $method HTTP Method to use for the request. + * @param string $url URL to point the request at. + * @param array $payload The data you want sent to the URL. * * @return void */ diff --git a/src/app/Console/Commands/AddCustomRouteContent.php b/src/app/Console/Commands/AddCustomRouteContent.php index 93d919881a..75d57b42e2 100644 --- a/src/app/Console/Commands/AddCustomRouteContent.php +++ b/src/app/Console/Commands/AddCustomRouteContent.php @@ -115,9 +115,9 @@ private function customRoutesFileEndLine($file_lines) /** * Parse the given file stream and return the line number where a string is found. * - * @param string $needle The string that's being searched for. - * @param array $haystack The file where the search is being performed. - * @return bool|int The last line number where the string was found. Or false. + * @param string $needle The string that's being searched for. + * @param array $haystack The file where the search is being performed. + * @return bool|int The last line number where the string was found. Or false. */ private function getLastLineNumberThatContains($needle, $haystack) { diff --git a/src/app/Console/Commands/AddSidebarContent.php b/src/app/Console/Commands/AddSidebarContent.php index 2a03a45dce..15dcc931e8 100644 --- a/src/app/Console/Commands/AddSidebarContent.php +++ b/src/app/Console/Commands/AddSidebarContent.php @@ -65,9 +65,9 @@ public function handle() /** * Parse the given file stream and return the line number where a string is found. * - * @param string $needle The string that's being searched for. - * @param array $haystack The file where the search is being performed. - * @return bool|int The last line number where the string was found. Or false. + * @param string $needle The string that's being searched for. + * @param array $haystack The file where the search is being performed. + * @return bool|int The last line number where the string was found. Or false. */ private function getLastLineNumberThatContains($needle, $haystack) { diff --git a/src/app/Console/Commands/PublishBackpackMiddleware.php b/src/app/Console/Commands/PublishBackpackMiddleware.php index bd44191527..4839e223cc 100644 --- a/src/app/Console/Commands/PublishBackpackMiddleware.php +++ b/src/app/Console/Commands/PublishBackpackMiddleware.php @@ -55,7 +55,7 @@ public function handle() /** * Build the class. Replace Backpack namespace with App one. * - * @param string $name + * @param string $name * * @return string */ @@ -70,8 +70,8 @@ protected function buildClass($name = false) * Replace the namespace for the given stub. * Replace the User model, if it was moved to App\Models\User. * - * @param string $stub - * @param string $name + * @param string $stub + * @param string $name * * @return $this */ diff --git a/src/app/Console/Commands/PublishView.php b/src/app/Console/Commands/PublishView.php index ed0b9d2f9f..553db1fd97 100644 --- a/src/app/Console/Commands/PublishView.php +++ b/src/app/Console/Commands/PublishView.php @@ -67,7 +67,7 @@ public function handle() /** * Take a blade file from the vendor folder and publish it to the resources folder. * - * @param string $file The filename without extension + * @param string $file The filename without extension * * @return void */ diff --git a/src/app/Console/Commands/Traits/PrettyCommandOutput.php b/src/app/Console/Commands/Traits/PrettyCommandOutput.php index 997d794de4..374c270c04 100644 --- a/src/app/Console/Commands/Traits/PrettyCommandOutput.php +++ b/src/app/Console/Commands/Traits/PrettyCommandOutput.php @@ -12,9 +12,9 @@ trait PrettyCommandOutput /** * Run a SSH command. * - * @param string $command The SSH command that needs to be run - * @param bool $beforeNotice Information for the user before the command is run - * @param bool $afterNotice Information for the user after the command is run + * @param string $command The SSH command that needs to be run + * @param bool $beforeNotice Information for the user before the command is run + * @param bool $afterNotice Information for the user after the command is run * * @return mixed Command-line output */ @@ -51,10 +51,10 @@ public function executeProcess($command, $beforeNotice = false, $afterNotice = f /** * Run an artisan command. * - * @param string $command The artisan command to be run. - * @param array $arguments Key-value array of arguments to the artisan command. - * @param bool $beforeNotice Information for the user before the command is run - * @param bool $afterNotice Information for the user after the command is run + * @param string $command The artisan command to be run. + * @param array $arguments Key-value array of arguments to the artisan command. + * @param bool $beforeNotice Information for the user before the command is run + * @param bool $afterNotice Information for the user after the command is run * * @return mixed Command-line output */ @@ -82,8 +82,8 @@ public function executeArtisanProcess($command, $arguments = [], $beforeNotice = /** * Write text to the screen for the user to see. * - * @param string $type line, info, comment, question, error - * @param string $content + * @param string $type line, info, comment, question, error + * @param string $content */ public function echo($type, $content) { diff --git a/src/app/Console/Commands/Version.php b/src/app/Console/Commands/Version.php index e74c653251..4c80486b2d 100644 --- a/src/app/Console/Commands/Version.php +++ b/src/app/Console/Commands/Version.php @@ -44,7 +44,7 @@ public function handle() /** * Run a shell command in a separate process. * - * @param string $command Text to be executed. + * @param string $command Text to be executed. * * @return void */ diff --git a/src/app/Http/Controllers/Auth/LoginController.php b/src/app/Http/Controllers/Auth/LoginController.php index 38a2f12328..578368d728 100644 --- a/src/app/Http/Controllers/Auth/LoginController.php +++ b/src/app/Http/Controllers/Auth/LoginController.php @@ -65,7 +65,7 @@ public function username() /** * The user has logged out of the application. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * * @return mixed */ diff --git a/src/app/Http/Controllers/Auth/RegisterController.php b/src/app/Http/Controllers/Auth/RegisterController.php index d894981fac..e35242d6ea 100644 --- a/src/app/Http/Controllers/Auth/RegisterController.php +++ b/src/app/Http/Controllers/Auth/RegisterController.php @@ -43,7 +43,7 @@ public function __construct() /** * Get a validator for an incoming registration request. * - * @param array $data + * @param array $data * * @return \Illuminate\Contracts\Validation\Validator */ @@ -64,7 +64,7 @@ protected function validator(array $data) /** * Create a new user instance after a valid registration. * - * @param array $data + * @param array $data * * @return User */ @@ -100,7 +100,7 @@ public function showRegistrationForm() /** * Handle a registration request for the application. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * * @return \Illuminate\Http\Response */ diff --git a/src/app/Http/Controllers/Auth/ResetPasswordController.php b/src/app/Http/Controllers/Auth/ResetPasswordController.php index 1531188c23..aa782bac13 100644 --- a/src/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/src/app/Http/Controllers/Auth/ResetPasswordController.php @@ -27,7 +27,7 @@ class ResetPasswordController extends Controller /** * Get the path the user should be redirected to after password reset. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * * @return string */ @@ -64,8 +64,8 @@ public function __construct() * * If no token is present, display the link request form. * - * @param \Illuminate\Http\Request $request - * @param string|null $token + * @param \Illuminate\Http\Request $request + * @param string|null $token * * @return \Illuminate\Http\Response */ diff --git a/src/app/Http/Controllers/ChartController.php b/src/app/Http/Controllers/ChartController.php index 5fa4562353..1bd2f56f37 100644 --- a/src/app/Http/Controllers/ChartController.php +++ b/src/app/Http/Controllers/ChartController.php @@ -51,7 +51,7 @@ public function getLibraryFilePath() * Set the path where the chart widget will find the JS file (or files) * needeed to set up the charting. * - * @param string|array $path Full URL to the JS file of the charting library. Or array. + * @param string|array $path Full URL to the JS file of the charting library. Or array. */ protected function setLibraryFilePath($path) { @@ -63,7 +63,7 @@ protected function setLibraryFilePath($path) * Because the dataset always includes the name of the charting library, * we can use that to determine which JS file we should be loading from the CDN. * - * @param string $dataset Class name of the dataset of the current chart. + * @param string $dataset Class name of the dataset of the current chart. */ protected function setLibraryFilePathFromDatasetType($dataset) { diff --git a/src/app/Http/Controllers/CrudController.php b/src/app/Http/Controllers/CrudController.php index 3687298fcf..4b6ea4d8f4 100644 --- a/src/app/Http/Controllers/CrudController.php +++ b/src/app/Http/Controllers/CrudController.php @@ -55,9 +55,9 @@ public function setup() * Load routes for all operations. * Allow developers to load extra routes by creating a method that looks like setupOperationNameRoutes. * - * @param string $segment Name of the current entity (singular). - * @param string $routeName Route name prefix (ends with .). - * @param string $controller Name of the current controller. + * @param string $segment Name of the current entity (singular). + * @param string $routeName Route name prefix (ends with .). + * @param string $controller Name of the current controller. */ public function setupRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/BulkCloneOperation.php b/src/app/Http/Controllers/Operations/BulkCloneOperation.php index 9fe64dcc84..0daecb7b0d 100644 --- a/src/app/Http/Controllers/Operations/BulkCloneOperation.php +++ b/src/app/Http/Controllers/Operations/BulkCloneOperation.php @@ -9,9 +9,9 @@ trait BulkCloneOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupBulkCloneRoutes($segment, $routeName, $controller) { @@ -42,7 +42,7 @@ protected function setupBulkCloneDefaults() /** * Create duplicates of multiple entries in the datatabase. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Controllers/Operations/BulkDeleteOperation.php b/src/app/Http/Controllers/Operations/BulkDeleteOperation.php index 27418034d1..948150bdc8 100644 --- a/src/app/Http/Controllers/Operations/BulkDeleteOperation.php +++ b/src/app/Http/Controllers/Operations/BulkDeleteOperation.php @@ -9,9 +9,9 @@ trait BulkDeleteOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupBulkDeleteRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/CloneOperation.php b/src/app/Http/Controllers/Operations/CloneOperation.php index 7971de2d24..3bdb7fb598 100644 --- a/src/app/Http/Controllers/Operations/CloneOperation.php +++ b/src/app/Http/Controllers/Operations/CloneOperation.php @@ -9,9 +9,9 @@ trait CloneOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupCloneRoutes($segment, $routeName, $controller) { @@ -41,7 +41,7 @@ protected function setupCloneDefaults() /** * Create a duplicate of the current entry in the datatabase. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Controllers/Operations/CreateOperation.php b/src/app/Http/Controllers/Operations/CreateOperation.php index 90000c6946..1dae765123 100644 --- a/src/app/Http/Controllers/Operations/CreateOperation.php +++ b/src/app/Http/Controllers/Operations/CreateOperation.php @@ -9,9 +9,9 @@ trait CreateOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupCreateRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/DeleteOperation.php b/src/app/Http/Controllers/Operations/DeleteOperation.php index 1a5170d7fc..d5115a7251 100644 --- a/src/app/Http/Controllers/Operations/DeleteOperation.php +++ b/src/app/Http/Controllers/Operations/DeleteOperation.php @@ -9,9 +9,9 @@ trait DeleteOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupDeleteRoutes($segment, $routeName, $controller) { @@ -41,7 +41,7 @@ protected function setupDeleteDefaults() /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id * * @return string */ diff --git a/src/app/Http/Controllers/Operations/FetchOperation.php b/src/app/Http/Controllers/Operations/FetchOperation.php index a81ad8c886..c1a5de0725 100644 --- a/src/app/Http/Controllers/Operations/FetchOperation.php +++ b/src/app/Http/Controllers/Operations/FetchOperation.php @@ -10,9 +10,9 @@ trait FetchOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupFetchOperationRoutes($segment, $routeName, $controller) { @@ -34,7 +34,7 @@ protected function setupFetchOperationRoutes($segment, $routeName, $controller) /** * Gets items from database and returns to selects. * - * @param string|array $arg + * @param string|array $arg * @return \Illuminate\Http\JsonResponse|Illuminate\Database\Eloquent\Collection|Illuminate\Pagination\LengthAwarePaginator */ private function fetch($arg) diff --git a/src/app/Http/Controllers/Operations/InlineCreateOperation.php b/src/app/Http/Controllers/Operations/InlineCreateOperation.php index 8a30a74c56..fcb14b0706 100644 --- a/src/app/Http/Controllers/Operations/InlineCreateOperation.php +++ b/src/app/Http/Controllers/Operations/InlineCreateOperation.php @@ -10,9 +10,9 @@ trait InlineCreateOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupInlineCreateRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/ListOperation.php b/src/app/Http/Controllers/Operations/ListOperation.php index 2bb11274c9..defac73447 100644 --- a/src/app/Http/Controllers/Operations/ListOperation.php +++ b/src/app/Http/Controllers/Operations/ListOperation.php @@ -9,9 +9,9 @@ trait ListOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupListRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/ReorderOperation.php b/src/app/Http/Controllers/Operations/ReorderOperation.php index a5ab71ab1b..cdac357bac 100644 --- a/src/app/Http/Controllers/Operations/ReorderOperation.php +++ b/src/app/Http/Controllers/Operations/ReorderOperation.php @@ -9,9 +9,9 @@ trait ReorderOperation /** * Define which routes are needed for this operation. * - * @param string $name Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $name Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupReorderRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/ShowOperation.php b/src/app/Http/Controllers/Operations/ShowOperation.php index 0c6bb5a5ae..d6a0199e56 100644 --- a/src/app/Http/Controllers/Operations/ShowOperation.php +++ b/src/app/Http/Controllers/Operations/ShowOperation.php @@ -9,9 +9,9 @@ trait ShowOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupShowRoutes($segment, $routeName, $controller) { @@ -61,7 +61,7 @@ protected function setupShowDefaults() /** * Display the specified resource. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Controllers/Operations/UpdateOperation.php b/src/app/Http/Controllers/Operations/UpdateOperation.php index 71076ea8ba..80c99a13eb 100644 --- a/src/app/Http/Controllers/Operations/UpdateOperation.php +++ b/src/app/Http/Controllers/Operations/UpdateOperation.php @@ -9,9 +9,9 @@ trait UpdateOperation /** * Define which routes are needed for this operation. * - * @param string $name Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $name Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupUpdateRoutes($segment, $routeName, $controller) { @@ -57,7 +57,7 @@ protected function setupUpdateDefaults() /** * Show the form for editing the specified resource. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Middleware/CheckIfAdmin.php b/src/app/Http/Middleware/CheckIfAdmin.php index 4ea45bd84d..008c881ac6 100644 --- a/src/app/Http/Middleware/CheckIfAdmin.php +++ b/src/app/Http/Middleware/CheckIfAdmin.php @@ -51,8 +51,8 @@ private function respondToUnauthorizedRequest($request) /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * * @return mixed */ diff --git a/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php b/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php index 3c94184df7..2e449526bf 100644 --- a/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php +++ b/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php @@ -9,9 +9,9 @@ class UseBackpackAuthGuardInsteadOfDefaultAuthGuard /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null $guard + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard * * @return mixed */ diff --git a/src/app/Http/Requests/ChangePasswordRequest.php b/src/app/Http/Requests/ChangePasswordRequest.php index abf9f03431..8fd70dba84 100644 --- a/src/app/Http/Requests/ChangePasswordRequest.php +++ b/src/app/Http/Requests/ChangePasswordRequest.php @@ -35,7 +35,7 @@ public function rules() /** * Configure the validator instance. * - * @param \Illuminate\Validation\Validator $validator + * @param \Illuminate\Validation\Validator $validator * * @return void */ diff --git a/src/app/Library/CrudPanel/CrudButton.php b/src/app/Library/CrudPanel/CrudButton.php index 5b90e1edd0..2c7b9450c3 100644 --- a/src/app/Library/CrudPanel/CrudButton.php +++ b/src/app/Library/CrudPanel/CrudButton.php @@ -50,7 +50,7 @@ public function __construct($name, $stack = null, $type = null, $content = null, /** * Add a new button to the default stack. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. */ public static function name($attributes = null) { @@ -60,7 +60,7 @@ public static function name($attributes = null) /** * Add a new button to the default stack. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. */ public static function add($attributes = null) { @@ -78,7 +78,7 @@ public static function add($attributes = null) * div button. But they don't want them added to the before_content of after_content * stacks. So what they do is basically add them to a 'hidden' stack, that nobody will ever see. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. * @return CrudButton */ public static function make($attributes = null) @@ -96,7 +96,7 @@ public static function make($attributes = null) /** * Set the button stack (where the button will be shown). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * @return CrudButton */ public function stack($stack) @@ -109,7 +109,7 @@ public function stack($stack) /** * Sets the button type (view or model_function). * - * @param string $type The type of button - view or model_function. + * @param string $type The type of button - view or model_function. * @return CrudButton */ public function type($type) @@ -124,7 +124,7 @@ public function type($type) * For the view button type, set it to the view path, including namespace. * For the model_function button type, set it to the name of the method on the model. * - * @param string $content Path to view or name of method on Model. + * @param string $content Path to view or name of method on Model. * @return CrudButton */ public function content($content) @@ -138,7 +138,7 @@ public function content($content) * Sets the namespace and path of the view for this button. * Sets the button type as 'view'. * - * @param string $value Path to view file. + * @param string $value Path to view file. * @return CrudButton */ public function view($value) @@ -153,7 +153,7 @@ public function view($value) * Sets the name of the method on the model that contains the HTML for this button. * Sets the button type as 'model_function'. * - * @param string $value Name of the method on the model. + * @param string $value Name of the method on the model. * @return CrudButton */ public function modelFunction($value) @@ -170,7 +170,7 @@ public function modelFunction($value) * Sets the button type as 'model_function'. * Alias of the modelFunction() method. * - * @param string $value Name of the method on the model. + * @param string $value Name of the method on the model. * @return CrudButton */ public function model_function($value) @@ -182,7 +182,7 @@ public function model_function($value) * Unserts an property that is set on the current button. * Possible properties: name, stack, type, content. * - * @param string $property Name of the property that should be cleared. + * @param string $property Name of the property that should be cleared. * @return CrudButton */ public function forget($property) @@ -200,7 +200,7 @@ public function forget($property) * Moves the button to a certain button stack. * Alias of stack(). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * * @return self */ @@ -213,7 +213,7 @@ public function to($stack) * Moves the button to a certain button stack. * Alias of stack(). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * * @return self */ @@ -226,7 +226,7 @@ public function group($stack) * Moves the button to a certain button stack. * Alias of stack(). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * * @return self */ @@ -243,7 +243,7 @@ public function section($stack) * Get the end result that should be displayed to the user. * The HTML itself of the button. * - * @param object|null $entry The eloquent Model for the current entry or null if no current entry. + * @param object|null $entry The eloquent Model for the current entry or null if no current entry. * * @return HTML */ @@ -315,7 +315,7 @@ public function makeLast() /** * Move the current filter after another filter. * - * @param string $destination Name of the destination filter. + * @param string $destination Name of the destination filter. * @return CrudFilter */ public function after($destination) @@ -328,7 +328,7 @@ public function after($destination) /** * Move the current field before another field. * - * @param string $destination Name of the destination field. + * @param string $destination Name of the destination field. * @return CrudFilter */ public function before($destination) diff --git a/src/app/Library/CrudPanel/CrudColumn.php b/src/app/Library/CrudPanel/CrudColumn.php index caf94577ae..048cf092f4 100644 --- a/src/app/Library/CrudPanel/CrudColumn.php +++ b/src/app/Library/CrudPanel/CrudColumn.php @@ -58,7 +58,7 @@ public function crud() /** * Create a CrudColumn object with the parameter as its name. * - * @param string $name Name of the column in the db, or model attribute. + * @param string $name Name of the column in the db, or model attribute. * @return CrudColumn */ public static function name($name) @@ -79,7 +79,7 @@ public function remove() /** * Remove an attribute from the column definition array. * - * @param string $attribute Name of the attribute being removed + * @param string $attribute Name of the attribute being removed * @return CrudColumn */ public function forget($attribute) @@ -92,7 +92,7 @@ public function forget($attribute) /** * Move the current column after another column. * - * @param string $destinationColumn Name of the destination column. + * @param string $destinationColumn Name of the destination column. * @return CrudColumn */ public function after($destinationColumn) @@ -106,7 +106,7 @@ public function after($destinationColumn) /** * Move the current column before another column. * - * @param string $destinationColumn Name of the destination column. + * @param string $destinationColumn Name of the destination column. * @return CrudColumn */ public function before($destinationColumn) @@ -181,8 +181,8 @@ public function dd() /** * Set the value for a certain attribute on the CrudColumn object. * - * @param string $attribute Name of the attribute. - * @param mixed $value Value of that attribute. + * @param string $attribute Name of the attribute. + * @param mixed $value Value of that attribute. */ private function setAttributeValue($attribute, $value) { @@ -193,7 +193,7 @@ private function setAttributeValue($attribute, $value) * Replace all column attributes on the CrudColumn object * with the given array of attribute-value pairs. * - * @param array $array Array of attributes and their values. + * @param array $array Array of attributes and their values. */ private function setAllAttributeValues($array) { @@ -229,8 +229,8 @@ private function save() * * Eg: type('number') will set the "type" attribute to "number" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return CrudColumn */ diff --git a/src/app/Library/CrudPanel/CrudField.php b/src/app/Library/CrudPanel/CrudField.php index e6872acc68..d94f27e557 100644 --- a/src/app/Library/CrudPanel/CrudField.php +++ b/src/app/Library/CrudPanel/CrudField.php @@ -55,7 +55,7 @@ public function crud() /** * Create a CrudField object with the parameter as its name. * - * @param string $name Name of the column in the db, or model attribute. + * @param string $name Name of the column in the db, or model attribute. * @return CrudField */ public static function name($name) @@ -76,7 +76,7 @@ public function remove() /** * Remove an attribute from the current field definition array. * - * @param string $attribute Name of the attribute being removed. + * @param string $attribute Name of the attribute being removed. * @return CrudField */ public function forget($attribute) @@ -89,7 +89,7 @@ public function forget($attribute) /** * Move the current field after another field. * - * @param string $destinationField Name of the destination field. + * @param string $destinationField Name of the destination field. * @return CrudField */ public function after($destinationField) @@ -103,7 +103,7 @@ public function after($destinationField) /** * Move the current field before another field. * - * @param string $destinationField Name of the destination field. + * @param string $destinationField Name of the destination field. * @return CrudField */ public function before($destinationField) @@ -152,7 +152,7 @@ public function makeLast() * ->wrapper(['class' => 'form-group col-md-6']) * ->size(6). * - * @param int $numberOfColumns How many columns should this field span across (1-12)? + * @param int $numberOfColumns How many columns should this field span across (1-12)? * @return CrudField */ public function size($numberOfColumns) @@ -169,8 +169,8 @@ public function size($numberOfColumns) /** * Set the value for a certain attribute on the CrudField object. * - * @param string $attribute Name of the attribute. - * @param mixed $value Value of that attribute. + * @param string $attribute Name of the attribute. + * @param mixed $value Value of that attribute. */ private function setAttributeValue($attribute, $value) { @@ -181,7 +181,7 @@ private function setAttributeValue($attribute, $value) * Replace all field attributes on the CrudField object * with the given array of attribute-value pairs. * - * @param array $array Array of attributes and their values. + * @param array $array Array of attributes and their values. */ private function setAllAttributeValues($array) { @@ -248,8 +248,8 @@ public function dd() * * Eg: type('number') will set the "type" attribute to "number" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return CrudField */ diff --git a/src/app/Library/CrudPanel/CrudFilter.php b/src/app/Library/CrudPanel/CrudFilter.php index 6c7efa04e9..6b965fdcac 100644 --- a/src/app/Library/CrudPanel/CrudFilter.php +++ b/src/app/Library/CrudPanel/CrudFilter.php @@ -91,7 +91,7 @@ public function wasNotApplied() * Run the filter logic, default logic and/or fallback logic so that from this point on * the CRUD query has its results filtered, according to the Request. * - * @param array $input The GET parameters for which the filter should be applied. + * @param array $input The GET parameters for which the filter should be applied. * @return void */ public function apply($input = null) @@ -139,7 +139,7 @@ public function getViewWithNamespace() /** * Create a CrudFilter object with the parameter as its name. * - * @param string $name Name of the column in the db, or model attribute. + * @param string $name Name of the column in the db, or model attribute. * @return CrudPanel */ public static function name($name) @@ -160,7 +160,7 @@ public function remove() /** * Remove an attribute from the current filter definition array. * - * @param string $attribute Name of the attribute being removed. + * @param string $attribute Name of the attribute being removed. * @return CrudFilter */ public function forget($attribute) @@ -180,8 +180,8 @@ public function forget($attribute) /** * Remove an attribute from one field's definition array. - * @param string $field The name of the field. - * @param string $attribute The name of the attribute being removed. + * @param string $field The name of the field. + * @param string $attribute The name of the attribute being removed. */ public function removeFilterAttribute($filter, $attribute) { @@ -195,7 +195,7 @@ public function removeFilterAttribute($filter, $attribute) /** * Move the current filter after another filter. * - * @param string $destination Name of the destination filter. + * @param string $destination Name of the destination filter. * @return CrudFilter */ public function after($destination) @@ -208,7 +208,7 @@ public function after($destination) /** * Move the current field before another field. * - * @param string $destination Name of the destination field. + * @param string $destination Name of the destination field. * @return CrudFilter */ public function before($destination) @@ -250,7 +250,7 @@ public function makeLast() /** * Set the type of the filter. * - * @param string $value Name of blade view that shows the field. + * @param string $value Name of blade view that shows the field. * @return CrudFilter */ public function type($value) @@ -265,7 +265,7 @@ public function type($value) * Set the label of the filter - the element that the end-user can see and click * to activate the filter or an input that will activate the filter. * - * @param string $value A name for this filter that the end-user will understand. + * @param string $value A name for this filter that the end-user will understand. * @return CrudFilter */ public function label($value) @@ -280,7 +280,7 @@ public function label($value) * For example, the dropdown, select2 and select2 filters let the user select * pre-determined values to filter with. This is how to set those values that will be picked up. * - * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. + * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. * @return CrudFilter */ public function values($value) @@ -297,7 +297,7 @@ public function values($value) * * Alias of the values() method. * - * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. + * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. * @return CrudFilter */ public function options($value) @@ -309,7 +309,7 @@ public function options($value) * Set the blade view that will be used by the filter. * Should NOT include the namespace, that's defined separately using 'viewNamespace'. * - * @param string $value Path to the blade file, after the view namespace. + * @param string $value Path to the blade file, after the view namespace. * @return CrudFilter */ public function view($value) @@ -323,7 +323,7 @@ public function view($value) * The path to the blade views directory where the filter file will be found. Ex: 'crud::filters' * Useful to load filters from a different package or directory. * - * @param string $value Blade path to the directory. + * @param string $value Blade path to the directory. * @return CrudFilter */ public function viewNamespace($value) @@ -336,7 +336,7 @@ public function viewNamespace($value) /** * Define what happens when the filter is active, through a closure. * - * @param Closure $value Closure that will be called when Request has this name as GET parameter. + * @param Closure $value Closure that will be called when Request has this name as GET parameter. * @return CrudFilter */ public function logic($value) @@ -349,7 +349,7 @@ public function logic($value) /** * Define what happens when the filter is NOT active, through a closure. * - * @param Closure $value Closure that will be called when Request does NOT have this name as GET parameter. + * @param Closure $value Closure that will be called when Request does NOT have this name as GET parameter. * @return CrudFilter */ public function fallbackLogic($value) @@ -362,7 +362,7 @@ public function fallbackLogic($value) /** * Define if the filter has already been applied (logic or fallbackLogic called). * - * @param bool $value Whether the filter has been run. + * @param bool $value Whether the filter has been run. * @return CrudFilter */ public function applied($value) @@ -425,8 +425,8 @@ private function crud() /** * Set the value for a certain attribute on the CrudFilter object. * - * @param string $attribute Name of the attribute. - * @param string $value Value of that attribute. + * @param string $attribute Name of the attribute. + * @param string $value Value of that attribute. */ private function setOptionValue($attribute, $value) { @@ -437,7 +437,7 @@ private function setOptionValue($attribute, $value) * Replace all field options on the CrudFilter object * with the given array of attribute-value pairs. * - * @param array $array Array of options and their values. + * @param array $array Array of options and their values. */ private function setAllOptionsValues($array) { @@ -463,9 +463,9 @@ private function save() } /** - * @param string $name - * @param string $operator - * @param array $input + * @param string $name + * @param string $operator + * @param array $input */ private function applyDefaultLogic($name, $operator, $input = null) { @@ -556,8 +556,8 @@ public function dd() * * Eg: type('number') will set the "type" attribute to "number" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return CrudFilter */ diff --git a/src/app/Library/CrudPanel/CrudPanel.php b/src/app/Library/CrudPanel/CrudPanel.php index cafdd704df..b5142fd90d 100644 --- a/src/app/Library/CrudPanel/CrudPanel.php +++ b/src/app/Library/CrudPanel/CrudPanel.php @@ -71,7 +71,7 @@ public function __construct() /** * Set the request instance for this CRUD. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request */ public function setRequest($request = null) { @@ -95,7 +95,7 @@ public function getRequest() * This function binds the CRUD to its corresponding Model (which extends Eloquent). * All Create-Read-Update-Delete operations are done using that Eloquent Collection. * - * @param string $model_namespace Full model namespace. Ex: App\Models\Article + * @param string $model_namespace Full model namespace. Ex: App\Models\Article * * @throws \Exception in case the model does not exist */ @@ -173,7 +173,7 @@ public function getSqlDriverList() * Set the route for this CRUD. * Ex: admin/article. * - * @param string $route Route name. + * @param string $route Route name. */ public function setRoute($route) { @@ -184,8 +184,8 @@ public function setRoute($route) * Set the route for this CRUD using the route name. * Ex: admin.article. * - * @param string $route Route name. - * @param array $parameters Parameters. + * @param string $route Route name. + * @param array $parameters Parameters. * * @throws \Exception */ @@ -219,8 +219,8 @@ public function getRoute() * Set the entity name in singular and plural. * Used all over the CRUD interface (header, add button, reorder button, breadcrumbs). * - * @param string $singular Entity name, in singular. Ex: article - * @param string $plural Entity name, in plural. Ex: articles + * @param string $singular Entity name, in singular. Ex: article + * @param string $plural Entity name, in plural. Ex: articles */ public function setEntityNameStrings($singular, $plural) { @@ -270,7 +270,7 @@ public function getActionMethod() * Check if the controller method being called * matches a given string. * - * @param string $methodName Name of the method (ex: index, create, update) + * @param string $methodName Name of the method (ex: index, create, update) * * @return bool Whether the condition is met or not. */ @@ -286,8 +286,8 @@ public function actionIs($methodName) /** * Return the first element in an array that has the given 'type' attribute. * - * @param string $type - * @param array $array + * @param string $type + * @param array $array * * @return array */ @@ -330,11 +330,11 @@ public function sync($type, $fields, $attributes) * App/Models/Address defined by a company() method on the user model and an address() method on the * company model, the 'App/Models/Address' string will be returned. * - * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. - * @param int $length Optionally specify the number of relations to omit from the start of the relation string. If - * the provided length is negative, then that many relations will be omitted from the end of the relation - * string. - * @param \Illuminate\Database\Eloquent\Model $model Optionally specify a different model than the one in the crud object. + * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. + * @param int $length Optionally specify the number of relations to omit from the start of the relation string. If + * the provided length is negative, then that many relations will be omitted from the end of the relation + * string. + * @param \Illuminate\Database\Eloquent\Model $model Optionally specify a different model than the one in the crud object. * * @return string Relation model name. */ @@ -367,11 +367,11 @@ public function getRelationModel($relationString, $length = null, $model = null) * Get the given attribute from a model or models resulting from the specified relation string (eg: the list of streets from * the many addresses of the company of a given user). * - * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). - * @param string $relationString Model relation. Can be a string representing the name of a relation method in the given - * Model or one from a different Model through multiple relations. A dot notation can be used to specify - * multiple relations (eg: user.company.address). - * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). + * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). + * @param string $relationString Model relation. Can be a string representing the name of a relation method in the given + * Model or one from a different Model through multiple relations. A dot notation can be used to specify + * multiple relations (eg: user.company.address). + * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). * * @return array An array containing a list of attributes from the resulting model. */ @@ -418,9 +418,9 @@ public function getRelatedEntriesAttributes($model, $relationString, $attribute) /** * Parse translatable attributes from a model or models resulting from the specified relation string. * - * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). - * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). - * @param string $value Attribute value translatable or not + * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). + * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). + * @param string $value Attribute value translatable or not * * @return string A string containing the translated attributed based on app()->getLocale() */ @@ -455,8 +455,8 @@ public function parseTranslatableAttributes($model, $attribute, $value) * Traverse the tree of relations for the given model, defined by the given relation string, and return the ending * associated model instance or instances. * - * @param \Illuminate\Database\Eloquent\Model $model The CRUD model. - * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. + * @param \Illuminate\Database\Eloquent\Model $model The CRUD model. + * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. * * @return array An array of the associated model instances defined by the relation string. */ diff --git a/src/app/Library/CrudPanel/Traits/Access.php b/src/app/Library/CrudPanel/Traits/Access.php index b6087df122..603fb43fe8 100644 --- a/src/app/Library/CrudPanel/Traits/Access.php +++ b/src/app/Library/CrudPanel/Traits/Access.php @@ -9,7 +9,7 @@ trait Access /** * Set an operation as having access using the Settings API. * - * @param array $operation + * @param array $operation * * @return bool */ @@ -25,7 +25,7 @@ public function allowAccess($operation) /** * Disable the access to a certain operation, or the current one. * - * @param array $operation [description] + * @param array $operation [description] * * @return [type] [description] */ @@ -41,7 +41,7 @@ public function denyAccess($operation) /** * Check if a operation is allowed for a Crud Panel. Return false if not. * - * @param string $operation + * @param string $operation * * @return bool */ @@ -53,7 +53,7 @@ public function hasAccess($operation) /** * Check if any operations are allowed for a Crud Panel. Return false if not. * - * @param array $operation_array + * @param array $operation_array * * @return bool */ @@ -71,7 +71,7 @@ public function hasAccessToAny($operation_array) /** * Check if all operations are allowed for a Crud Panel. Return false if not. * - * @param array $operation_array Permissions. + * @param array $operation_array Permissions. * * @return bool */ @@ -89,7 +89,7 @@ public function hasAccessToAll($operation_array) /** * Check if a operation is allowed for a Crud Panel. Fail if not. * - * @param string $operation + * @param string $operation * * @throws \Backpack\CRUD\Exception\AccessDeniedException in case the operation is not enabled * diff --git a/src/app/Library/CrudPanel/Traits/AutoSet.php b/src/app/Library/CrudPanel/Traits/AutoSet.php index 79b2ff5d6f..2b18a458dd 100644 --- a/src/app/Library/CrudPanel/Traits/AutoSet.php +++ b/src/app/Library/CrudPanel/Traits/AutoSet.php @@ -90,7 +90,7 @@ public function getDbTableColumns() /** * Infer a field type, judging from the database column type. * - * @param string $field Field name. + * @param string $field Field name. * * @return string Field type. */ @@ -177,7 +177,7 @@ public function setDoctrineTypesMapping() /** * Turn a database column name or PHP variable into a pretty label to be shown to the user. * - * @param string $value The value. + * @param string $value The value. * * @return string The transformed value. */ @@ -201,7 +201,7 @@ public function getLabel($value) /** * Change the way labels are made. * - * @param callable $labeller A function that receives a string and returns the formatted string, after stripping down useless characters. + * @param callable $labeller A function that receives a string and returns the formatted string, after stripping down useless characters. * * @return self */ diff --git a/src/app/Library/CrudPanel/Traits/Buttons.php b/src/app/Library/CrudPanel/Traits/Buttons.php index f3e75175b7..5285079453 100644 --- a/src/app/Library/CrudPanel/Traits/Buttons.php +++ b/src/app/Library/CrudPanel/Traits/Buttons.php @@ -16,8 +16,8 @@ trait Buttons * they will be pushed to the end of the button collection. * * - * @param string $stack Stack where the buttons belongs. Options: top, line, bottom. - * @param array $order Ordered name of the buttons. ['update', 'delete', 'show'] + * @param string $stack Stack where the buttons belongs. Options: top, line, bottom. + * @param array $order Ordered name of the buttons. ['update', 'delete', 'show'] */ public function orderButtons(string $stack, array $order) { @@ -60,13 +60,13 @@ public function orderButtons(string $stack, array $order) /** * Add a button to the CRUD table view. * - * @param string $stack Where should the button be visible? Options: top, line, bottom. - * @param string $name The name of the button. Unique. - * @param string $type Type of button: view or model_function. - * @param string $content The HTML for the button. - * @param bool|string $position Position on the stack: beginning or end. If false, the position will be - * 'beginning' for the line stack or 'end' otherwise. - * @param bool $replaceExisting True if a button with the same name on the given stack should be replaced. + * @param string $stack Where should the button be visible? Options: top, line, bottom. + * @param string $name The name of the button. Unique. + * @param string $type Type of button: view or model_function. + * @param string $content The HTML for the button. + * @param bool|string $position Position on the stack: beginning or end. If false, the position will be + * 'beginning' for the line stack or 'end' otherwise. + * @param bool $replaceExisting True if a button with the same name on the given stack should be replaced. * * @return \Backpack\CRUD\app\Library\CrudPanel\CrudButton The new CRUD button. */ @@ -102,8 +102,8 @@ public function buttons() /** * Modify the attributes of a button. * - * @param string $name The button name. - * @param array $modifications The attributes and their new values. + * @param string $name The button name. + * @param array $modifications The attributes and their new values. * * @return CrudButton The button that has suffered the changes, for daisychaining methods. */ @@ -130,8 +130,8 @@ public function modifyButton($name, $modifications = null) /** * Remove a button from the CRUD panel. * - * @param string $name Button name. - * @param string $stack Optional stack name. + * @param string $name Button name. + * @param string $stack Optional stack name. */ public function removeButton($name, $stack = null) { @@ -141,8 +141,8 @@ public function removeButton($name, $stack = null) } /** - * @param array $names Button names - * @param string|null $stack Optional stack name. + * @param array $names Button names + * @param string|null $stack Optional stack name. */ public function removeButtons($names, $stack = null) { @@ -175,9 +175,9 @@ public function removeButtonFromStack($name, $stack) /** * Move the most recently added button before or after the given target button. Default is before. * - * @param string|array $target The target button name or array. - * @param string|array $destination The destination button name or array. - * @param bool $before If true, the button will be moved before the target button, otherwise it will be moved after it. + * @param string|array $target The target button name or array. + * @param string|array $destination The destination button name or array. + * @param bool $before If true, the button will be moved before the target button, otherwise it will be moved after it. */ public function moveButton($target, $where, $destination) { @@ -211,8 +211,8 @@ public function moveButton($target, $where, $destination) /** * Check if a filter exists, by any given attribute. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function hasButtonWhere($attribute, $value) @@ -223,8 +223,8 @@ public function hasButtonWhere($attribute, $value) /** * Get the first filter where a given attribute has the given value. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function firstButtonWhere($attribute, $value) @@ -246,7 +246,7 @@ public function getButtonKey($buttonName) /** * Add a new button to the current CRUD operation. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. * @return \Backpack\CRUD\app\Library\CrudPanel\CrudButton */ public function button($attributes = null) diff --git a/src/app/Library/CrudPanel/Traits/Columns.php b/src/app/Library/CrudPanel/Traits/Columns.php index bf96aed7d5..2045f6909f 100644 --- a/src/app/Library/CrudPanel/Traits/Columns.php +++ b/src/app/Library/CrudPanel/Traits/Columns.php @@ -26,7 +26,7 @@ public function columns() /** * Add a bunch of column names and their details to the CRUD object. * - * @param array|string $columns + * @param array|string $columns */ public function setColumns($columns) { @@ -61,7 +61,7 @@ public function setColumns($columns) /** * Add a column at the end of to the CRUD object's "columns" array. * - * @param array|string $column + * @param array|string $column * * @return self */ @@ -76,7 +76,7 @@ public function addColumn($column) /** * Add multiple columns at the end of the CRUD object's "columns" array. * - * @param array $columns + * @param array $columns */ public function addColumns($columns) { @@ -90,7 +90,7 @@ public function addColumns($columns) /** * Move the most recently added column after the given target column. * - * @param string|array $targetColumn The target column name or array. + * @param string|array $targetColumn The target column name or array. */ public function afterColumn($targetColumn) { @@ -100,7 +100,7 @@ public function afterColumn($targetColumn) /** * Move the most recently added column before the given target column. * - * @param string|array $targetColumn The target column name or array. + * @param string|array $targetColumn The target column name or array. */ public function beforeColumn($targetColumn) { @@ -125,7 +125,7 @@ public function makeFirstColumn() /** * Add the default column type to the given Column, inferring the type from the database column type. * - * @param array $column + * @param array $column * * @return array|bool */ @@ -143,7 +143,7 @@ public function addDefaultTypeToColumn($column) /** * Remove a column from the CRUD panel by name. * - * @param string $columnKey The column key. + * @param string $columnKey The column key. */ public function removeColumn($columnKey) { @@ -155,7 +155,7 @@ public function removeColumn($columnKey) /** * Remove multiple columns from the CRUD panel by name. * - * @param array $columns Array of column names. + * @param array $columns Array of column names. */ public function removeColumns($columns) { @@ -176,8 +176,8 @@ public function removeAllColumns() /** * Remove an attribute from one column's definition array. - * @param string $column The name of the column. - * @param string $attribute The name of the attribute being removed. + * @param string $column The name of the column. + * @param string $attribute The name of the attribute being removed. */ public function removeColumnAttribute($column, $attribute) { @@ -191,8 +191,8 @@ public function removeColumnAttribute($column, $attribute) /** * Change attributes for multiple columns. * - * @param array $columns - * @param array $attributes + * @param array $columns + * @param array $attributes */ public function setColumnsDetails($columns, $attributes) { @@ -204,8 +204,8 @@ public function setColumnsDetails($columns, $attributes) /** * Change attributes for a certain column. * - * @param string $columnKey Column key. - * @param array $attributesAndValues + * @param string $columnKey Column key. + * @param array $attributesAndValues */ public function setColumnDetails($columnKey, $attributesAndValues) { @@ -224,8 +224,8 @@ public function setColumnDetails($columnKey, $attributesAndValues) * Alias for setColumnDetails(). * Provides a consistent syntax with Fields, Buttons, Filters modify functionality. * - * @param string $column Column name. - * @param array $attributes + * @param string $column Column name. + * @param array $attributes */ public function modifyColumn($column, $attributes) { @@ -235,8 +235,8 @@ public function modifyColumn($column, $attributes) /** * Set label for a specific column. * - * @param string $column - * @param string $label + * @param string $column + * @param string $label */ public function setColumnLabel($column, $label) { @@ -261,7 +261,7 @@ public function getColumnsRelationships() * Order the CRUD columns. If certain columns are missing from the given order array, they will be pushed to the * new columns array in the original order. * - * @param array $order An array of column names in the desired order. + * @param array $order An array of column names in the desired order. */ public function orderColumns($order) { @@ -283,7 +283,7 @@ public function orderColumns($order) /** * Get a column by the id, from the associative array. * - * @param int $column_number Placement inside the columns array. + * @param int $column_number Placement inside the columns array. * * @return array Column details. */ @@ -309,7 +309,7 @@ public function getActionsColumnPriority() * Set a certain priority for the actions column * in the CRUD table view. Usually set to 10000 in order to hide it. * - * @param int $number The priority, from 1 to infinity. Lower is better. + * @param int $number The priority, from 1 to infinity. Lower is better. * * @return self */ @@ -323,8 +323,8 @@ public function setActionsColumnPriority($number) /** * Check if a column exists, by any given attribute. * - * @param string $attribute Attribute name on that column definition array. - * @param string $value Value of that attribute on that column definition array. + * @param string $attribute Attribute name on that column definition array. + * @param string $value Value of that attribute on that column definition array. * @return bool */ public function hasColumnWhere($attribute, $value) @@ -339,8 +339,8 @@ public function hasColumnWhere($attribute, $value) /** * Get the first column where a given attribute has the given value. * - * @param string $attribute Attribute name on that column definition array. - * @param string $value Value of that attribute on that column definition array. + * @param string $attribute Attribute name on that column definition array. + * @param string $value Value of that attribute on that column definition array. * @return bool */ public function firstColumnWhere($attribute, $value) @@ -357,8 +357,8 @@ public function firstColumnWhere($attribute, $value) * This method checks that all necessary attributes are set. * If not, it tries to guess them. * - * @param string|array $column The column definition array OR column name as string. - * @return array Proper column definition array. + * @param string|array $column The column definition array OR column name as string. + * @return array Proper column definition array. */ public function makeSureColumnHasNeededAttributes($column) { @@ -418,7 +418,7 @@ public function countColumnsWithoutActions() * And if the developer uses the CrudColumn object as Column in his CrudController: * - Column::name('price')->type('number'); * - * @param string $name The name of the column in the db, or model attribute. + * @param string $name The name of the column in the db, or model attribute. * @return CrudColumn */ public function column($name) diff --git a/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php b/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php index c364e139b7..384a8d68d6 100644 --- a/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php +++ b/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php @@ -10,7 +10,7 @@ trait ColumnsProtectedMethods /** * Add a column to the current operation, using the Setting API. * - * @param array $column Column definition array. + * @param array $column Column definition array. */ protected function addColumnToOperationSettings($column) { @@ -23,8 +23,8 @@ protected function addColumnToOperationSettings($column) /** * If a column priority has not been defined, provide a default one. * - * @param array $column Column definition array. - * @return array Proper array defining the column. + * @param array $column Column definition array. + * @return array Proper array defining the column. */ protected function makeSureColumnHasPriority($column) { @@ -40,8 +40,8 @@ protected function makeSureColumnHasPriority($column) * If the field definition array is actually a string, it means the programmer was lazy * and has only passed the name of the column. Turn that into a proper array. * - * @param array $column Column definition array. - * @return array Proper array defining the column. + * @param array $column Column definition array. + * @return array Proper array defining the column. */ protected function makeSureColumnHasName($column) { @@ -60,8 +60,8 @@ protected function makeSureColumnHasName($column) * If a column array is missing the "label" attribute, an ugly error would be show. * So we add the field Name as a label - it's better than nothing. * - * @param array $column Column definition array. - * @return array Proper array defining the column. + * @param array $column Column definition array. + * @return array Proper array defining the column. */ protected function makeSureColumnHasLabel($column) { @@ -75,8 +75,8 @@ protected function makeSureColumnHasLabel($column) /** * If a column definition is missing the type, set a default. * - * @param array $column Column definition array. - * @return array Column definition array with type. + * @param array $column Column definition array. + * @return array Column definition array with type. */ protected function makeSureColumnHasType($column) { @@ -102,8 +102,8 @@ protected function makeSureColumnHasType($column) * The key is used when storing all columns using the Settings API, * it is used as the "key" of the associative array that holds all columns. * - * @param array $column Column definition array. - * @return array Column definition array with key. + * @param array $column Column definition array. + * @return array Column definition array with key. */ protected function makeSureColumnHasKey($column) { @@ -120,8 +120,8 @@ protected function makeSureColumnHasKey($column) * By defining this array a developer can wrap the text into an anchor (link), * span, div or whatever they want. * - * @param array $column Column definition array. - * @return array Column definition array with wrapper. + * @param array $column Column definition array. + * @return array Column definition array with wrapper. */ protected function makeSureColumnHasWrapper($column) { @@ -136,8 +136,8 @@ protected function makeSureColumnHasWrapper($column) * If an entity has been defined for the column, but no model, * determine the model from that relationship. * - * @param array $column Column definition array. - * @return array Column definition array with model. + * @param array $column Column definition array. + * @return array Column definition array with model. */ protected function makeSureColumnHasModel($column) { @@ -153,8 +153,8 @@ protected function makeSureColumnHasModel($column) /** * Move the most recently added column before or after the given target column. Default is before. * - * @param string|array $targetColumn The target column name or array. - * @param bool $before If true, the column will be moved before the target column, otherwise it will be moved after it. + * @param string|array $targetColumn The target column name or array. + * @param bool $before If true, the column will be moved before the target column, otherwise it will be moved after it. */ protected function moveColumn($targetColumn, $before = true) { @@ -179,8 +179,8 @@ protected function moveColumn($targetColumn, $before = true) /** * Check if the column exists in the database, as a DB column. * - * @param string $table - * @param string $name + * @param string $table + * @param string $name * * @return bool */ diff --git a/src/app/Library/CrudPanel/Traits/Create.php b/src/app/Library/CrudPanel/Traits/Create.php index 6be6aa7352..aaae9c2bc8 100644 --- a/src/app/Library/CrudPanel/Traits/Create.php +++ b/src/app/Library/CrudPanel/Traits/Create.php @@ -17,7 +17,7 @@ trait Create /** * Insert a row in the database. * - * @param array $data All input values to be inserted. + * @param array $data All input values to be inserted. * * @return \Illuminate\Database\Eloquent\Model */ @@ -90,8 +90,8 @@ public function getRelationFieldsWithPivot() /** * Create the relations for the current model. * - * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. - * @param array $data The form data. + * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. + * @param array $data The form data. */ public function createRelations($item, $data) { @@ -102,8 +102,8 @@ public function createRelations($item, $data) /** * Sync the declared many-to-many associations through the pivot field. * - * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. - * @param array $data The form data. + * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. + * @param array $data The form data. */ public function syncPivot($model, $data) { @@ -142,8 +142,8 @@ public function syncPivot($model, $data) /** * Create any existing one to one relations for the current model from the form data. * - * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. - * @param array $data The form data. + * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. + * @param array $data The form data. */ private function createOneToOneRelations($item, $data) { @@ -154,8 +154,8 @@ private function createOneToOneRelations($item, $data) /** * Create any existing one to one relations for the current model from the relation data. * - * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. - * @param array $formattedData The form data. + * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. + * @param array $formattedData The form data. * * @return bool|null */ @@ -208,7 +208,7 @@ private function createRelationsForItem($item, $formattedData) * Those will be nested accordingly in this relation array, so address relation will have a nested relation with country. * * - * @param array $data The form data. + * @param array $data The form data. * * @return array The formatted relation data. */ diff --git a/src/app/Library/CrudPanel/Traits/Delete.php b/src/app/Library/CrudPanel/Traits/Delete.php index 16ec7c8406..f00d16bbb5 100644 --- a/src/app/Library/CrudPanel/Traits/Delete.php +++ b/src/app/Library/CrudPanel/Traits/Delete.php @@ -13,7 +13,7 @@ trait Delete /** * Delete a row from the database. * - * @param int $id The id of the item to be deleted. + * @param int $id The id of the item to be deleted. * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException if the model was not found. * diff --git a/src/app/Library/CrudPanel/Traits/FakeFields.php b/src/app/Library/CrudPanel/Traits/FakeFields.php index 0eff4510a5..bdde1e9fea 100644 --- a/src/app/Library/CrudPanel/Traits/FakeFields.php +++ b/src/app/Library/CrudPanel/Traits/FakeFields.php @@ -11,9 +11,9 @@ trait FakeFields * The resulting array will only include the fields that are stored in the database and their values, * plus the '_token' and 'redirect_after_save' variables. * - * @param array $requestInput The request input. - * @param string $form The CRUD form. Can be 'create' or 'update' . Default is 'create'. - * @param int|bool $id The CRUD entry id in the case of the 'update' form. + * @param array $requestInput The request input. + * @param string $form The CRUD form. Can be 'create' or 'update' . Default is 'create'. + * @param int|bool $id The CRUD entry id in the case of the 'update' form. * * @see \Illuminate\Http\Request::all() For an example on how to get the request input. * @@ -55,9 +55,9 @@ public function compactFakeFields($requestInput) /** * Compact a fake field in the request input array. * - * @param array $requestInput The request input. - * @param string $fakeFieldName The fake field name. - * @param string $fakeFieldKey The fake field key. + * @param array $requestInput The request input. + * @param string $fakeFieldName The fake field name. + * @param string $fakeFieldKey The fake field key. */ private function addCompactedField(&$requestInput, $fakeFieldName, $fakeFieldKey) { diff --git a/src/app/Library/CrudPanel/Traits/Fields.php b/src/app/Library/CrudPanel/Traits/Fields.php index e8b1fcb185..62f1e993d1 100644 --- a/src/app/Library/CrudPanel/Traits/Fields.php +++ b/src/app/Library/CrudPanel/Traits/Fields.php @@ -29,8 +29,8 @@ public function fields() * Everything else Backpack can probably guess. This method makes sure the * field definition array is complete, by guessing missing attributes. * - * @param string|array $field The definition of a field (string or array). - * @return array The correct definition of that field. + * @param string|array $field The definition of a field (string or array). + * @return array The correct definition of that field. */ public function makeSureFieldHasNecessaryAttributes($field) { @@ -56,7 +56,7 @@ public function makeSureFieldHasNecessaryAttributes($field) /** * Add a field to the create/update form or both. * - * @param string|array $field The new field. + * @param string|array $field The new field. * * @return self */ @@ -73,7 +73,7 @@ public function addField($field) /** * Add multiple fields to the create/update form or both. * - * @param array $fields The new fields. + * @param array $fields The new fields. */ public function addFields($fields) { @@ -87,7 +87,7 @@ public function addFields($fields) /** * Move the most recently added field after the given target field. * - * @param string $targetFieldName The target field name. + * @param string $targetFieldName The target field name. */ public function afterField($targetFieldName) { @@ -99,7 +99,7 @@ public function afterField($targetFieldName) /** * Move the most recently added field before the given target field. * - * @param string $targetFieldName The target field name. + * @param string $targetFieldName The target field name. */ public function beforeField($targetFieldName) { @@ -126,7 +126,7 @@ public function makeFirstField() /** * Remove a certain field from the create/update/both forms by its name. * - * @param string $name Field name (as defined with the addField() procedure) + * @param string $name Field name (as defined with the addField() procedure) */ public function removeField($name) { @@ -140,7 +140,7 @@ public function removeField($name) /** * Remove many fields from the create/update/both forms by their name. * - * @param array $array_of_names A simple array of the names of the fields to be removed. + * @param array $array_of_names A simple array of the names of the fields to be removed. */ public function removeFields($array_of_names) { @@ -166,8 +166,8 @@ public function removeAllFields() /** * Remove an attribute from one field's definition array. - * @param string $field The name of the field. - * @param string $attribute The name of the attribute being removed. + * @param string $field The name of the field. + * @param string $attribute The name of the attribute being removed. */ public function removeFieldAttribute($field, $attribute) { @@ -181,8 +181,8 @@ public function removeFieldAttribute($field, $attribute) /** * Update value of a given key for a current field. * - * @param string $fieldName The field name - * @param array $modifications An array of changes to be made. + * @param string $fieldName The field name + * @param array $modifications An array of changes to be made. */ public function modifyField($fieldName, $modifications) { @@ -202,8 +202,8 @@ public function modifyField($fieldName, $modifications) /** * Set label for a specific field. * - * @param string $field - * @param string $label + * @param string $field + * @param string $label */ public function setFieldLabel($field, $label) { @@ -214,7 +214,7 @@ public function setFieldLabel($field, $label) * Check if field is the first of its type in the given fields array. * It's used in each field_type.blade.php to determine wether to push the css and js content or not (we only need to push the js and css for a field the first time it's loaded in the form, not any subsequent times). * - * @param array $field The current field being tested if it's the first of its type. + * @param array $field The current field being tested if it's the first of its type. * * @return bool true/false */ @@ -274,7 +274,7 @@ public function getCurrentFields() * Order the CRUD fields. If certain fields are missing from the given order array, they will be * pushed to the new fields array in the original order. * - * @param array $order An array of field names in the desired order. + * @param array $order An array of field names in the desired order. */ public function orderFields($order) { @@ -297,8 +297,8 @@ public function getFields() * Check if the create/update form has upload fields. * Upload fields are the ones that have "upload" => true defined on them. * - * @param string $form create/update/both - defaults to 'both' - * @param bool|int $id id of the entity - defaults to false + * @param string $form create/update/both - defaults to 'both' + * @param bool|int $id id of the entity - defaults to false * * @return bool */ @@ -329,7 +329,7 @@ public function getLoadedFieldTypes() /** * Set an array of field type names as already loaded for the current operation. * - * @param array $fieldTypes + * @param array $fieldTypes */ public function setLoadedFieldTypes($fieldTypes) { @@ -340,7 +340,7 @@ public function setLoadedFieldTypes($fieldTypes) * Get a namespaced version of the field type name. * Appends the 'view_namespace' attribute of the field to the `type', using dot notation. * - * @param mixed $field + * @param mixed $field * @return string Namespaced version of the field type name. Ex: 'text', 'custom.view.path.text' */ public function getFieldTypeWithNamespace($field) @@ -360,8 +360,8 @@ public function getFieldTypeWithNamespace($field) /** * Add a new field type to the loadedFieldTypes array. * - * @param string $field Field array - * @return bool Successful operation true/false. + * @param string $field Field array + * @return bool Successful operation true/false. */ public function addLoadedFieldType($field) { @@ -382,8 +382,8 @@ public function addLoadedFieldType($field) * Alias of the addLoadedFieldType() method. * Adds a new field type to the loadedFieldTypes array. * - * @param string $field Field array - * @return bool Successful operation true/false. + * @param string $field Field array + * @return bool Successful operation true/false. */ public function markFieldTypeAsLoaded($field) { @@ -393,8 +393,8 @@ public function markFieldTypeAsLoaded($field) /** * Check if a field type's reasources (CSS and JS) have already been loaded. * - * @param string $field Field array - * @return bool Whether the field type has been marked as loaded. + * @param string $field Field array + * @return bool Whether the field type has been marked as loaded. */ public function fieldTypeLoaded($field) { @@ -404,8 +404,8 @@ public function fieldTypeLoaded($field) /** * Check if a field type's reasources (CSS and JS) have NOT been loaded. * - * @param string $field Field array - * @return bool Whether the field type has NOT been marked as loaded. + * @param string $field Field array + * @return bool Whether the field type has NOT been marked as loaded. */ public function fieldTypeNotLoaded($field) { @@ -446,8 +446,8 @@ public function getStrippedSaveRequest() /** * Check if a field exists, by any given attribute. * - * @param string $attribute Attribute name on that field definition array. - * @param string $value Value of that attribute on that field definition array. + * @param string $attribute Attribute name on that field definition array. + * @param string $value Value of that attribute on that field definition array. * @return bool */ public function hasFieldWhere($attribute, $value) @@ -462,8 +462,8 @@ public function hasFieldWhere($attribute, $value) /** * Get the first field where a given attribute has the given value. * - * @param string $attribute Attribute name on that field definition array. - * @param string $value Value of that attribute on that field definition array. + * @param string $attribute Attribute name on that field definition array. + * @param string $value Value of that attribute on that field definition array. * @return bool */ public function firstFieldWhere($attribute, $value) @@ -484,7 +484,7 @@ public function firstFieldWhere($attribute, $value) * And if the developer uses the CrudField object as Field in his CrudController: * - Field::name('price')->type('number'); * - * @param string $name The name of the column in the db, or model attribute. + * @param string $name The name of the column in the db, or model attribute. * @return CrudField */ public function field($name) diff --git a/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php b/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php index 7d5cc02aeb..9be0bd7fd6 100644 --- a/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php +++ b/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php @@ -7,9 +7,9 @@ trait FieldsPrivateMethods /** * Move the most recently added field before or after the given target field. Default is before. * - * @param array $fields The form fields. - * @param string $targetFieldName The target field name. - * @param bool $before If true, the field will be moved before the target field, otherwise it will be moved after it. + * @param array $fields The form fields. + * @param string $targetFieldName The target field name. + * @param bool $before If true, the field will be moved before the target field, otherwise it will be moved after it. * * @return array */ @@ -37,8 +37,8 @@ private function moveField($fields, $targetFieldName, $before = true) /** * Apply the given order to the fields and return the new array. * - * @param array $fields The fields array. - * @param array $order The desired field order array. + * @param array $fields The fields array. + * @param array $order The desired field order array. * * @return array The ordered fields array. */ @@ -63,7 +63,7 @@ private function applyOrderToFields($fields, $order) /** * Apply the given callback to the form fields. * - * @param callable $callback The callback function to run for the given form fields. + * @param callable $callback The callback function to run for the given form fields. */ private function transformFields(callable $callback) { diff --git a/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php b/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php index 2484ca0ac7..fecf297656 100644 --- a/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php +++ b/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php @@ -10,7 +10,7 @@ trait FieldsProtectedMethods /** * If field has entity we want to get the relation type from it. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasRelationType($field) @@ -23,7 +23,7 @@ public function makeSureFieldHasRelationType($field) /** * If field has entity we want to make sure it also has a model for that relation. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasModel($field) @@ -36,7 +36,7 @@ public function makeSureFieldHasModel($field) /** * Based on relation type we can guess if pivot is set. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasPivot($field) @@ -49,7 +49,7 @@ public function makeSureFieldHasPivot($field) /** * Based on relation type we can try to guess if it is a multiple field. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasMultiple($field) @@ -64,7 +64,7 @@ public function makeSureFieldHasMultiple($field) /** * In case field name is dot notation we want to convert it to a valid HTML array field name for validation purposes. * - * @param array $field + * @param array $field * @return array */ public function overwriteFieldNameFromDotNotationToArray($field) @@ -87,7 +87,7 @@ public function overwriteFieldNameFromDotNotationToArray($field) * If the field_definition_array array is a string, it means the programmer was lazy * and has only passed the name of the field. Turn that into a proper array. * - * @param string|array $field The field definition array (or string). + * @param string|array $field The field definition array (or string). * @return array */ protected function makeSureFieldHasName($field) @@ -208,8 +208,8 @@ protected function makeSureFieldHasAttribute($field) * Set the label of a field, if it's missing, by capitalizing the name and replacing * underscores with spaces. * - * @param array $field Field definition array. - * @return array Field definition array that contains label too. + * @param array $field Field definition array. + * @return array Field definition array that contains label too. */ protected function makeSureFieldHasLabel($field) { @@ -226,8 +226,8 @@ protected function makeSureFieldHasLabel($field) * Set the type of a field, if it's missing, by inferring it from the * db column type. * - * @param array $field Field definition array. - * @return array Field definition array that contains type too. + * @param array $field Field definition array. + * @return array Field definition array that contains type too. */ protected function makeSureFieldHasType($field) { @@ -241,7 +241,7 @@ protected function makeSureFieldHasType($field) /** * Enable the tabs functionality, if a field has a tab defined. * - * @param array $field Field definition array. + * @param array $field Field definition array. * @return void */ protected function enableTabsIfFieldUsesThem($field) @@ -257,7 +257,7 @@ protected function enableTabsIfFieldUsesThem($field) /** * Add a field to the current operation, using the Settings API. * - * @param array $field Field definition array. + * @param array $field Field definition array. */ protected function addFieldToOperationSettings($field) { @@ -277,8 +277,8 @@ protected function addFieldToOperationSettings($field) * - name (if the name is a string) * - name1_name2_name3 (if the name is an array) * - * @param array $field Field definition array. - * @return string The string that should be used as array key. + * @param array $field Field definition array. + * @return string The string that should be used as array key. */ protected function getFieldKey($field) { diff --git a/src/app/Library/CrudPanel/Traits/Filters.php b/src/app/Library/CrudPanel/Traits/Filters.php index d481988207..a5b5101f23 100644 --- a/src/app/Library/CrudPanel/Traits/Filters.php +++ b/src/app/Library/CrudPanel/Traits/Filters.php @@ -44,10 +44,10 @@ public function clearFilters() /** * Add a filter to the CRUD table view. * - * @param array $options Name, type, label, etc. - * @param bool|array|\Closure $values The HTML for the filter. - * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. - * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. + * @param array $options Name, type, label, etc. + * @param bool|array|\Closure $values The HTML for the filter. + * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. + * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. */ public function addFilter($options, $values = false, $filterLogic = false, $fallbackLogic = false) { @@ -61,10 +61,10 @@ public function addFilter($options, $values = false, $filterLogic = false, $fall * Add a filter to the CrudPanel object using the Settings API. * The filter will NOT get applied. * - * @param array $options Name, type, label, etc. - * @param bool|array|\Closure $values The HTML for the filter. - * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. - * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. + * @param array $options Name, type, label, etc. + * @param bool|array|\Closure $values The HTML for the filter. + * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. + * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. */ protected function addFilterToCollection($options, $values = false, $filterLogic = false, $fallbackLogic = false) { @@ -91,7 +91,7 @@ protected function addFilterToCollection($options, $values = false, $filterLogic * Add a filter by specifying the entire CrudFilter object. * The filter logic does NOT get applied. * - * @param CrudFilter $object + * @param CrudFilter $object */ public function addCrudFilter($object) { @@ -101,8 +101,8 @@ public function addCrudFilter($object) /** * Apply the filter. * - * @param CrudFilter $filter - * @param ParameterBag|array|null $input + * @param CrudFilter $filter + * @param ParameterBag|array|null $input */ public function applyFilter(CrudFilter $filter, $input = null) { @@ -135,7 +135,7 @@ public function filters() } /** - * @param string $name + * @param string $name * * @return null|CrudFilter */ @@ -147,7 +147,7 @@ public function getFilter($name) } /** - * @param string $name + * @param string $name * * @return bool */ @@ -161,8 +161,8 @@ public function hasActiveFilter($name) /** * Modify the attributes of a filter. * - * @param string $name The filter name. - * @param array $modifications An array of changes to be made. + * @param string $name The filter name. + * @param array $modifications An array of changes to be made. * * @return CrudFilter The filter that has suffered modifications, for daisychaining methods. */ @@ -213,7 +213,7 @@ public function removeAllFilters() /** * Move the most recently added filter after the given target filter. * - * @param string|array $destination The target filter name or array. + * @param string|array $destination The target filter name or array. */ public function afterFilter($destination) { @@ -225,7 +225,7 @@ public function afterFilter($destination) /** * Move the most recently added filter before the given target filter. * - * @param string|array $destination The target filter name or array. + * @param string|array $destination The target filter name or array. */ public function beforeFilter($destination) { @@ -261,9 +261,9 @@ public function getFilterKey($filterName) /** * Move the most recently added filter before or after the given target filter. Default is before. * - * @param string|array $target The target filter name or array. - * @param string|array $destination The destination filter name or array. - * @param bool $before If true, the filter will be moved before the target filter, otherwise it will be moved after it. + * @param string|array $target The target filter name or array. + * @param string|array $destination The destination filter name or array. + * @param bool $before If true, the filter will be moved before the target filter, otherwise it will be moved after it. */ public function moveFilter($target, $where, $destination) { @@ -297,8 +297,8 @@ public function moveFilter($target, $where, $destination) /** * Check if a filter exists, by any given attribute. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function hasFilterWhere($attribute, $value) @@ -309,8 +309,8 @@ public function hasFilterWhere($attribute, $value) /** * Get the first filter where a given attribute has the given value. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function firstFilterWhere($attribute, $value) @@ -329,7 +329,7 @@ public function firstFilterWhere($attribute, $value) * And if the developer uses the CrudField object as Field in his CrudController: * - Filter::name('price')->type('range')->whenActive(function($value) {}); * - * @param string $name The name of the column in the db, or model attribute. + * @param string $name The name of the column in the db, or model attribute. * @return CrudField */ public function filter($name) diff --git a/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php b/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php index 32ed844415..5fbe6c8a3b 100644 --- a/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php +++ b/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php @@ -12,7 +12,7 @@ trait HeadingsAndTitles /** * Get the title string for the current controller method (action). * - * @param bool $action create / edit / reorder / etc + * @param bool $action create / edit / reorder / etc * * @return string */ @@ -30,8 +30,8 @@ public function getTitle($action = false) /** * Change the title of a page for a certain controller method (action). * - * @param string $string string to use as title - * @param string $action create / edit / reorder / etc + * @param string $string string to use as title + * @param string $action create / edit / reorder / etc */ public function setTitle($string, $action = false) { @@ -50,7 +50,7 @@ public function setTitle($string, $action = false) /** * Get the heading string for the current controller method (action). * - * @param bool $action create / edit / reorder / etc + * @param bool $action create / edit / reorder / etc * * @return string */ @@ -68,8 +68,8 @@ public function getHeading($action = false) /** * Change the heading of a page for a certain controller method (action). * - * @param string $string string to use as heading - * @param string $action create / edit / reorder / etc + * @param string $string string to use as heading + * @param string $action create / edit / reorder / etc */ public function setHeading($string, $action = false) { @@ -88,7 +88,7 @@ public function setHeading($string, $action = false) /** * Get the subheading for a certain controller method (action). * - * @param bool $action create / edit / reorder / etc + * @param bool $action create / edit / reorder / etc * * @return string */ @@ -106,8 +106,8 @@ public function getSubheading($action = false) /** * Change the subheading of a page for a certain controller method (action). * - * @param string $string string to use as subheading - * @param string $action create / edit / reorder / etc + * @param string $string string to use as subheading + * @param string $action create / edit / reorder / etc */ public function setSubheading($string, $action = false) { diff --git a/src/app/Library/CrudPanel/Traits/Macroable.php b/src/app/Library/CrudPanel/Traits/Macroable.php index 42e5f1ca9d..acfff7d940 100644 --- a/src/app/Library/CrudPanel/Traits/Macroable.php +++ b/src/app/Library/CrudPanel/Traits/Macroable.php @@ -14,8 +14,8 @@ trait Macroable * In addition to registering the macro, throw an error if the method already exists on the object * so the developer knows why his macro is not being registered. * - * @param string $name - * @param object|callable $macro + * @param string $name + * @param object|callable $macro * * @return void */ diff --git a/src/app/Library/CrudPanel/Traits/Operations.php b/src/app/Library/CrudPanel/Traits/Operations.php index b8fde70238..402937cbf5 100644 --- a/src/app/Library/CrudPanel/Traits/Operations.php +++ b/src/app/Library/CrudPanel/Traits/Operations.php @@ -26,7 +26,7 @@ public function getOperation() /** * Set the CRUD operation being performed in string form. * - * @param string $operation_name Ex: create / update / revision / delete + * @param string $operation_name Ex: create / update / revision / delete */ public function setOperation($operation_name) { @@ -46,7 +46,7 @@ public function getCurrentOperation() /** * Set the CRUD operation being performed in string form. * - * @param string $operation_name Ex: create / update / revision / delete + * @param string $operation_name Ex: create / update / revision / delete */ public function setCurrentOperation($operation_name) { @@ -56,8 +56,8 @@ public function setCurrentOperation($operation_name) /** * Convenience method to make sure all calls are made to a particular operation. * - * @param string|array $operation Operation name in string form - * @param bool|\Closure $closure Code that calls CrudPanel methods. + * @param string|array $operation Operation name in string form + * @param bool|\Closure $closure Code that calls CrudPanel methods. * * @return void */ @@ -71,8 +71,8 @@ public function operation($operations, $closure = false) * Allc configurations are put inside that operation's namespace. * Ex: show.configuration. * - * @param string|array $operation Operation name in string form - * @param bool|\Closure $closure Code that calls CrudPanel methods. + * @param string|array $operation Operation name in string form + * @param bool|\Closure $closure Code that calls CrudPanel methods. * * @return void */ @@ -93,7 +93,7 @@ public function configureOperation($operations, $closure = false) * This is called when an operation does setCurrentOperation(). * * - * @param string|array $operations [description] + * @param string|array $operations [description] * * @return void */ diff --git a/src/app/Library/CrudPanel/Traits/Query.php b/src/app/Library/CrudPanel/Traits/Query.php index 8a7453a1ed..91eeb49296 100644 --- a/src/app/Library/CrudPanel/Traits/Query.php +++ b/src/app/Library/CrudPanel/Traits/Query.php @@ -22,7 +22,7 @@ trait Query * $query->activePosts(); * }); * - * @param callable $function + * @param callable $function * * @return mixed */ @@ -34,7 +34,7 @@ public function addClause($function) /** * Use eager loading to reduce the number of queries on the table view. * - * @param array|string $entities + * @param array|string $entities * * @return \Illuminate\Database\Eloquent\Builder */ @@ -46,8 +46,8 @@ public function with($entities) /** * Order the results of the query in a certain way. * - * @param string $field - * @param string $order + * @param string $field + * @param string $order * * @return \Illuminate\Database\Eloquent\Builder */ @@ -63,8 +63,8 @@ public function orderBy($field, $order = 'asc') /** * Order results of the query in a custom way. * - * @param array $column Column array with all attributes - * @param string $column_direction ASC or DESC + * @param array $column Column array with all attributes + * @param string $column_direction ASC or DESC * * @return \Illuminate\Database\Eloquent\Builder */ @@ -88,7 +88,7 @@ public function customOrderBy($column, $columnDirection = 'asc') /** * Group the results of the query in a certain way. * - * @param string $field + * @param string $field * * @return \Illuminate\Database\Eloquent\Builder */ @@ -100,7 +100,7 @@ public function groupBy($field) /** * Limit the number of results in the query. * - * @param int $number + * @param int $number * * @return \Illuminate\Database\Eloquent\Builder */ @@ -112,7 +112,7 @@ public function limit($number) /** * Take a certain number of results from the query. * - * @param int $number + * @param int $number * * @return \Illuminate\Database\Eloquent\Builder */ @@ -124,7 +124,7 @@ public function take($number) /** * Start the result set from a certain number. * - * @param int $number + * @param int $number * * @return \Illuminate\Database\Eloquent\Builder */ diff --git a/src/app/Library/CrudPanel/Traits/Read.php b/src/app/Library/CrudPanel/Traits/Read.php index 9c9e050caf..192a32d11e 100644 --- a/src/app/Library/CrudPanel/Traits/Read.php +++ b/src/app/Library/CrudPanel/Traits/Read.php @@ -229,7 +229,7 @@ public function addCustomPageLengthToPageLengthMenu() /** * Specify array of available page lengths on the list view. * - * @param array|int $menu + * @param array|int $menu * * https://backpackforlaravel.com/docs/4.1/crud-cheat-sheet#page-length */ @@ -263,7 +263,7 @@ public function setPageLengthMenu($menu) * Builds the menu from the given array. It works out with two different types of arrays: * [1, 2, 3] AND [1 => 'one', 2 => 'two', 3 => 'three']. * - * @param array $menu + * @param array $menu * @return array */ private function buildPageLengthMenuFromArray($menu) @@ -309,7 +309,7 @@ public function getPageLengthMenu() /** * Checks if the provided PageLength segment is valid. * - * @param array|int $value + * @param array|int $value * @return void */ private function abortIfInvalidPageLength($value) diff --git a/src/app/Library/CrudPanel/Traits/Relationships.php b/src/app/Library/CrudPanel/Traits/Relationships.php index 524fe83182..ef52910e3f 100644 --- a/src/app/Library/CrudPanel/Traits/Relationships.php +++ b/src/app/Library/CrudPanel/Traits/Relationships.php @@ -9,7 +9,7 @@ trait Relationships /** * From the field entity we get the relation instance. * - * @param array $entity + * @param array $entity * @return object */ public function getRelationInstance($field) @@ -47,7 +47,7 @@ public function getRelationInstance($field) /** * Grabs an relation instance and returns the class name of the related model. * - * @param array $field + * @param array $field * @return string */ public function inferFieldModelFromRelationship($field) @@ -60,7 +60,7 @@ public function inferFieldModelFromRelationship($field) /** * Return the relation type from a given field: BelongsTo, HasOne ... etc. * - * @param array $field + * @param array $field * @return string */ public function inferRelationTypeFromRelationship($field) @@ -74,7 +74,7 @@ public function inferRelationTypeFromRelationship($field) * Parse the field name back to the related entity after the form is submited. * Its called in getAllFieldNames(). * - * @param array $fields + * @param array $fields * @return array */ public function parseRelationFieldNamesFromHtml($fields) @@ -99,7 +99,7 @@ public function parseRelationFieldNamesFromHtml($fields) /** * Based on relation type returns the default field type. * - * @param string $relation_type + * @param string $relation_type * @return bool */ public function inferFieldTypeFromFieldRelation($field) @@ -121,7 +121,7 @@ public function inferFieldTypeFromFieldRelation($field) /** * Based on relation type returns if relation allows multiple entities. * - * @param string $relation_type + * @param string $relation_type * @return bool */ public function guessIfFieldHasMultipleFromRelationType($relation_type) @@ -144,7 +144,7 @@ public function guessIfFieldHasMultipleFromRelationType($relation_type) /** * Based on relation type returns if relation has a pivot table. * - * @param string $relation_type + * @param string $relation_type * @return bool */ public function guessIfFieldHasPivotFromRelationType($relation_type) diff --git a/src/app/Library/CrudPanel/Traits/Reorder.php b/src/app/Library/CrudPanel/Traits/Reorder.php index a54ede05e5..262c431ac8 100644 --- a/src/app/Library/CrudPanel/Traits/Reorder.php +++ b/src/app/Library/CrudPanel/Traits/Reorder.php @@ -10,7 +10,7 @@ trait Reorder /** * Change the order and parents of the given elements, according to the NestedSortable AJAX call. * - * @param array $request The entire request from the NestedSortable AJAX Call. + * @param array $request The entire request from the NestedSortable AJAX Call. * * @return int The number of items whose position in the tree has been changed. */ @@ -41,8 +41,8 @@ public function updateTreeOrder($request) * Enable the Reorder functionality in the CRUD Panel for users that have the been given access to 'reorder' using: * $this->crud->allowAccess('reorder');. * - * @param string $label Column name that will be shown on the labels. - * @param int $max_level Maximum hierarchy level to which the elements can be nested (1 = no nesting, just reordering). + * @param string $label Column name that will be shown on the labels. + * @param int $max_level Maximum hierarchy level to which the elements can be nested (1 = no nesting, just reordering). */ public function enableReorder($label = 'name', $max_level = 1) { diff --git a/src/app/Library/CrudPanel/Traits/SaveActions.php b/src/app/Library/CrudPanel/Traits/SaveActions.php index 60011afe22..d609bfeb24 100644 --- a/src/app/Library/CrudPanel/Traits/SaveActions.php +++ b/src/app/Library/CrudPanel/Traits/SaveActions.php @@ -42,7 +42,7 @@ public function getFallBackSaveAction() /** * Gets the save action that has the desired order. * - * @param int $order + * @param int $order * @return array */ public function getSaveActionByOrder($order) @@ -55,7 +55,7 @@ public function getSaveActionByOrder($order) /** * Allow the developer to register multiple save actions. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function addSaveActions($saveActions) @@ -73,7 +73,7 @@ public function addSaveActions($saveActions) /** * Allow developers to register save action into CRUD. * - * @param array $saveAction + * @param array $saveAction * @return void */ public function addSaveAction(array $saveAction) @@ -100,8 +100,8 @@ public function addSaveAction(array $saveAction) /** * Replaces setting order or forces some default. * - * @param string $saveAction - * @param int $wantedOrder + * @param string $saveAction + * @param int $wantedOrder * @return int */ public function orderSaveAction(string $saveAction, int $wantedOrder) @@ -127,7 +127,7 @@ public function orderSaveAction(string $saveAction, int $wantedOrder) /** * Replace the current save actions with the ones provided. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function replaceSaveActions($saveActions) @@ -145,7 +145,7 @@ public function replaceSaveActions($saveActions) /** * Alias function of replaceSaveActions() for CRUD consistency. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function setSaveActions($saveActions) @@ -156,7 +156,7 @@ public function setSaveActions($saveActions) /** * Allow the developer to remove multiple save actions from settings. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function removeSaveActions(array $saveActions) @@ -169,7 +169,7 @@ public function removeSaveActions(array $saveActions) /** * Allow the developer to remove a save action from settings. * - * @param string $saveAction + * @param string $saveAction * @return void */ public function removeSaveAction(string $saveAction) @@ -184,7 +184,7 @@ public function removeSaveAction(string $saveAction) /** * Allow the developer to unset all save actions. * - * @param string $saveAction + * @param string $saveAction * @return void */ public function removeAllSaveActions() @@ -195,7 +195,7 @@ public function removeAllSaveActions() /** * Allows the developer to set save actions order. It could be ['action1','action2'] or ['action1' => 1, 'action2' => 2]. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function orderSaveActions(array $saveActions) @@ -248,7 +248,7 @@ public function getVisibleSaveActions() /** * Gets the current save action for this crud. * - * @param array $saveOptions + * @param array $saveOptions * @return array */ public function getCurrentSaveAction($saveOptions) @@ -298,7 +298,7 @@ public function getSaveAction() /** * Change the session variable that remembers what to do after the "Save" action. * - * @param string|null $forceSaveAction + * @param string|null $forceSaveAction * * @return void */ @@ -322,7 +322,7 @@ public function setSaveAction($forceSaveAction = null) /** * Redirect to the correct URL, depending on which save action has been selected. * - * @param string $itemId + * @param string $itemId * * @return \Illuminate\Http\Response */ diff --git a/src/app/Library/CrudPanel/Traits/Search.php b/src/app/Library/CrudPanel/Traits/Search.php index 14e262236b..1538e1bc56 100644 --- a/src/app/Library/CrudPanel/Traits/Search.php +++ b/src/app/Library/CrudPanel/Traits/Search.php @@ -16,7 +16,7 @@ trait Search /** * Add conditions to the CRUD query for a particular search term. * - * @param string $searchTerm Whatever string the user types in the search bar. + * @param string $searchTerm Whatever string the user types in the search bar. * * @return \Illuminate\Database\Eloquent\Builder */ @@ -101,7 +101,7 @@ public function applySearchLogicForColumn($query, $column, $searchTerm) /** * Tell the list view to NOT show a reponsive DataTable. * - * @param bool $value + * @param bool $value */ public function setResponsiveTable($value = true) { @@ -145,7 +145,7 @@ public function disableResponsiveTable() /** * Tell the list view to NOT store datatable information in local storage. * - * @param bool $value + * @param bool $value */ public function setPersistentTable($value = true) { @@ -199,8 +199,8 @@ public function disablePersistentTable() /** * Get the HTML of the cells in a table row, for a certain DB entry. * - * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; - * @param bool|int $rowNumber The number shown to the user as row number (index); + * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; + * @param bool|int $rowNumber The number shown to the user as row number (index); * * @return array Array of HTML cell contents. */ @@ -237,9 +237,9 @@ public function getRowViews($entry, $rowNumber = false) /** * Get the HTML of a cell, using the column types. * - * @param array $column - * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; - * @param bool|int $rowNumber The number shown to the user as row number (index); + * @param array $column + * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; + * @param bool|int $rowNumber The number shown to the user as row number (index); * * @return string */ @@ -251,7 +251,7 @@ public function getCellView($column, $entry, $rowNumber = false) /** * Get the name of the view to load for the cell. * - * @param array $column + * @param array $column * * @return string */ @@ -279,10 +279,10 @@ private function getCellViewName($column) /** * Render the given view. * - * @param string $view - * @param array $column - * @param object $entry - * @param bool|int $rowNumber The number shown to the user as row number (index) + * @param string $view + * @param array $column + * @param object $entry + * @param bool|int $rowNumber The number shown to the user as row number (index) * * @return string */ @@ -303,10 +303,10 @@ private function renderCellView($view, $column, $entry, $rowNumber = false) /** * Created the array to be fed to the data table. * - * @param array $entries Eloquent results. - * @param int $totalRows - * @param int $filteredRows - * @param bool|int $startIndex + * @param array $entries Eloquent results. + * @param int $totalRows + * @param int $filteredRows + * @param bool|int $startIndex * * @return array */ @@ -329,8 +329,8 @@ public function getEntriesAsJsonForDatatables($entries, $totalRows, $filteredRow /** * Return the column attribute (column in database) prefixed with table to use in search. * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param string $column + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string $column * @return string */ public function getColumnWithTableNamePrefixed($query, $column) diff --git a/src/app/Library/CrudPanel/Traits/Settings.php b/src/app/Library/CrudPanel/Traits/Settings.php index 50a718691b..97d373e03e 100644 --- a/src/app/Library/CrudPanel/Traits/Settings.php +++ b/src/app/Library/CrudPanel/Traits/Settings.php @@ -14,7 +14,7 @@ trait Settings /** * Getter for the settings key-value store. * - * @param string $key Usually operation.name (ex: list.exportButtons) + * @param string $key Usually operation.name (ex: list.exportButtons) * * @return mixed [description] */ @@ -26,8 +26,8 @@ public function get(string $key) /** * Setter for the settings key-value store. * - * @param string $key Usually operation.name (ex: reorder.max_level) - * @param bool $value True/false depending on success. + * @param string $key Usually operation.name (ex: reorder.max_level) + * @param bool $value True/false depending on success. */ public function set(string $key, $value) { @@ -37,7 +37,7 @@ public function set(string $key, $value) /** * Check if the settings key is used (has a value). * - * @param string $key Usually operation.name (ex: reorder.max_level) + * @param string $key Usually operation.name (ex: reorder.max_level) * * @return bool */ @@ -65,8 +65,8 @@ public function settings() /** * Getter and setter for the settings key-value store. * - * @param string $key Usually operation.name (ex: list.exportButtons) - * @param mixed $value The value you want to store. + * @param string $key Usually operation.name (ex: list.exportButtons) + * @param mixed $value The value you want to store. * * @return mixed Setting value for setter. True/false for getter. */ @@ -82,8 +82,8 @@ public function setting(string $key, $value = null) /** * Convenience method for getting or setting a key on the current operation. * - * @param string $key Has no operation prepended. (ex: exportButtons) - * @param mixed $value The value you want to store. + * @param string $key Has no operation prepended. (ex: exportButtons) + * @param mixed $value The value you want to store. * * @return mixed Setting value for setter. True/false for getter. */ @@ -98,7 +98,7 @@ public function operationSetting(string $key, $value = null, $operation = null) * Getter for the settings key-value store on a certain operation. * Defaults to the current operation. * - * @param string $key Has no operation prepended. (ex: exportButtons) + * @param string $key Has no operation prepended. (ex: exportButtons) * * @return mixed [description] */ @@ -113,7 +113,7 @@ public function getOperationSetting(string $key, $operation = null) * Check if the settings key is used (has a value). * Defaults to the current operation. * - * @param string $key Has no operation prepended. (ex: exportButtons) + * @param string $key Has no operation prepended. (ex: exportButtons) * * @return mixed [description] */ @@ -128,8 +128,8 @@ public function hasOperationSetting(string $key, $operation = null) * Setter for the settings key-value store for a certain operation. * Defaults to the current operation. * - * @param string $key Has no operation prepended. (ex: max_level) - * @param bool $value True/false depending on success. + * @param string $key Has no operation prepended. (ex: max_level) + * @param bool $value True/false depending on success. */ public function setOperationSetting(string $key, $value, $operation = null) { @@ -142,7 +142,7 @@ public function setOperationSetting(string $key, $value, $operation = null) * Automatically set values in config file (config/backpack/crud) * as settings values for that operation. * - * @param string $configPath Config string that leads to where the configs are stored. + * @param string $configPath Config string that leads to where the configs are stored. */ public function loadDefaultOperationSettingsFromConfig($configPath = null) { diff --git a/src/app/Library/CrudPanel/Traits/Tabs.php b/src/app/Library/CrudPanel/Traits/Tabs.php index a3813baac9..529eb383e1 100644 --- a/src/app/Library/CrudPanel/Traits/Tabs.php +++ b/src/app/Library/CrudPanel/Traits/Tabs.php @@ -72,7 +72,7 @@ public function disableHorizontalTabs() } /** - * @param string $label + * @param string $label * * @return bool */ diff --git a/src/app/Library/CrudPanel/Traits/Update.php b/src/app/Library/CrudPanel/Traits/Update.php index 57e28c5362..3f909d7594 100644 --- a/src/app/Library/CrudPanel/Traits/Update.php +++ b/src/app/Library/CrudPanel/Traits/Update.php @@ -15,8 +15,8 @@ trait Update /** * Update a row in the database. * - * @param int $id The entity's id - * @param array $data All inputs to be updated. + * @param int $id The entity's id + * @param array $data All inputs to be updated. * * @return object */ @@ -41,7 +41,7 @@ public function update($id, $data) /** * Get all fields needed for the EDIT ENTRY form. * - * @param int $id The id of the entry that is being edited. + * @param int $id The id of the entry that is being edited. * * @return array The fields with attributes, fake attributes and values. */ @@ -79,8 +79,8 @@ public function getUpdateFields($id = false) /** * Get the value of the 'name' attribute from the declared relation model in the given field. * - * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. - * @param array $field The CRUD field array. + * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. + * @param array $field The CRUD field array. * * @return mixed The value of the 'name' attribute from the relation model. */ diff --git a/src/app/Library/CrudPanel/Traits/Validation.php b/src/app/Library/CrudPanel/Traits/Validation.php index b45bcd33ac..5582969c08 100644 --- a/src/app/Library/CrudPanel/Traits/Validation.php +++ b/src/app/Library/CrudPanel/Traits/Validation.php @@ -10,7 +10,7 @@ trait Validation * Mark a FormRequest file as required for the current operation, in Settings. * Adds the required rules to an array for easy access. * - * @param string $class Class that extends FormRequest + * @param string $class Class that extends FormRequest */ public function setValidation($class) { @@ -37,7 +37,7 @@ public function disableValidation() /** * Mark a FormRequest file as required for the current operation, in Settings. * - * @param string $class Class that extends FormRequest + * @param string $class Class that extends FormRequest */ public function setFormRequest($class) { @@ -80,7 +80,7 @@ public function validateRequest() * Parse a FormRequest class, figure out what inputs are required * and store this knowledge in the current object. * - * @param string $class Class that extends FormRequest + * @param string $class Class that extends FormRequest */ public function setRequiredFields($class) { @@ -106,8 +106,8 @@ public function setRequiredFields($class) * Check the current object to see if an input is required * for the given operation. * - * @param string $inputKey Field or input name. - * @param string $operation create / update + * @param string $inputKey Field or input name. + * @param string $operation create / update * * @return bool */ diff --git a/src/app/Library/CrudPanel/Traits/Views.php b/src/app/Library/CrudPanel/Traits/Views.php index 6fce61dc54..53497855d6 100644 --- a/src/app/Library/CrudPanel/Traits/Views.php +++ b/src/app/Library/CrudPanel/Traits/Views.php @@ -11,7 +11,7 @@ trait Views /** * Sets the create template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -33,7 +33,7 @@ public function getCreateView() /** * Sets the create content class. * - * @param string $class content class + * @param string $class content class */ public function setCreateContentClass(string $class) { @@ -57,7 +57,7 @@ public function getCreateContentClass() /** * Sets the list template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -79,7 +79,7 @@ public function getListView() /** * Sets the list content class. * - * @param string $class content class + * @param string $class content class */ public function setListContentClass(string $class) { @@ -99,7 +99,7 @@ public function getListContentClass() /** * Sets the details row template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -121,7 +121,7 @@ public function getDetailsRowView() /** * Sets the show template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -143,7 +143,7 @@ public function getShowView() /** * Sets the edit content class. * - * @param string $class content class + * @param string $class content class */ public function setShowContentClass(string $class) { @@ -167,7 +167,7 @@ public function getShowContentClass() /** * Sets the edit template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -189,7 +189,7 @@ public function getEditView() /** * Sets the edit content class. * - * @param string $class content class + * @param string $class content class */ public function setEditContentClass(string $class) { @@ -209,7 +209,7 @@ public function getEditContentClass() /** * Sets the reorder template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -231,7 +231,7 @@ public function getReorderView() /** * Sets the reorder content class. * - * @param string $class content class + * @param string $class content class */ public function setReorderContentClass(string $class) { diff --git a/src/app/Library/Widget.php b/src/app/Library/Widget.php index 6fc48732a2..42a8e51a45 100644 --- a/src/app/Library/Widget.php +++ b/src/app/Library/Widget.php @@ -23,7 +23,7 @@ public function __construct($attributes) * If a widget with the same name exists, it will update the attributes of that one * instead of creating a new one. * - * @param string|array $attributes Either the name of the widget, or an array with the attributes the new widget should hold, including the name attribute. + * @param string|array $attributes Either the name of the widget, or an array with the attributes the new widget should hold, including the name attribute. * * @return Widget */ @@ -71,7 +71,7 @@ public static function make($attributes = null) /** * Remove an attribute from the current definition array. * - * @param string $attribute Name of the attribute to forget (ex: class) + * @param string $attribute Name of the attribute to forget (ex: class) * @return Widget */ public function forget($attribute) @@ -247,8 +247,8 @@ public function dd() * * Eg: class('something') will set the "class" attribute to "something" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return Widget */ diff --git a/src/app/Models/Traits/HasFakeFields.php b/src/app/Models/Traits/HasFakeFields.php index 43e05abae4..bd1c24689c 100644 --- a/src/app/Models/Traits/HasFakeFields.php +++ b/src/app/Models/Traits/HasFakeFields.php @@ -15,7 +15,7 @@ trait HasFakeFields /** * Add fake fields as regular attributes, even though they are stored as JSON. * - * @param array $columns - the database columns that contain the JSONs + * @param array $columns - the database columns that contain the JSONs */ public function addFakes($columns = ['extras']) { @@ -41,7 +41,7 @@ public function addFakes($columns = ['extras']) /** * Return the entity with fake fields as attributes. * - * @param array $columns - the database columns that contain the JSONs + * @param array $columns - the database columns that contain the JSONs * * @return Model */ diff --git a/src/app/Models/Traits/HasRelationshipFields.php b/src/app/Models/Traits/HasRelationshipFields.php index 731b8330b5..4c202db4de 100644 --- a/src/app/Models/Traits/HasRelationshipFields.php +++ b/src/app/Models/Traits/HasRelationshipFields.php @@ -46,8 +46,8 @@ public function getTableWithPrefix() /** * Get the column type for a certain db column. * - * @param string $columnName Name of the column in the db table. - * @return string Db column type. + * @param string $columnName Name of the column in the db table. + * @return string Db column type. */ public function getColumnType($columnName) { @@ -60,7 +60,7 @@ public function getColumnType($columnName) /** * Checks if the given column name is nullable. * - * @param string $column_name The name of the db column. + * @param string $column_name The name of the db column. * @return bool */ public static function isColumnNullable($column_name) diff --git a/src/app/Models/Traits/HasUploadFields.php b/src/app/Models/Traits/HasUploadFields.php index 1a9ce516ad..5f4cd06429 100644 --- a/src/app/Models/Traits/HasUploadFields.php +++ b/src/app/Models/Traits/HasUploadFields.php @@ -23,10 +23,10 @@ trait HasUploadFields * - if the value is null, deletes the file and sets null in the DB * - if the value is different, stores the different file and updates DB value. * - * @param string $value Value for that column sent from the input. - * @param string $attribute_name Model attribute name (and column in the db). - * @param string $disk Filesystem disk used to store files. - * @param string $destination_path Path in disk where to store the files. + * @param string $value Value for that column sent from the input. + * @param string $attribute_name Model attribute name (and column in the db). + * @param string $disk Filesystem disk used to store files. + * @param string $destination_path Path in disk where to store the files. */ public function uploadFileToDisk($value, $attribute_name, $disk, $destination_path) { @@ -68,10 +68,10 @@ public function uploadFileToDisk($value, $attribute_name, $disk, $destination_pa * - deletes the file * - removes that file from the DB. * - * @param string $value Value for that column sent from the input. - * @param string $attribute_name Model attribute name (and column in the db). - * @param string $disk Filesystem disk used to store files. - * @param string $destination_path Path in disk where to store the files. + * @param string $value Value for that column sent from the input. + * @param string $attribute_name Model attribute name (and column in the db). + * @param string $disk Filesystem disk used to store files. + * @param string $destination_path Path in disk where to store the files. */ public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path) { diff --git a/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php b/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php index 690a56f5eb..c11ea88958 100644 --- a/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php +++ b/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php @@ -23,7 +23,7 @@ trait HasTranslations /** * Use the forced locale if present. * - * @param string $key + * @param string $key * * @return mixed */ @@ -67,7 +67,7 @@ public function getTranslation(string $key, string $locale, bool $useFallbackLoc /** * Create translated items as json. * - * @param array $attributes + * @param array $attributes * * @return static */ @@ -95,8 +95,8 @@ public static function create(array $attributes = []) /** * Update translated items as json. * - * @param array $attributes - * @param array $options + * @param array $attributes + * @param array $options * * @return bool */ @@ -177,8 +177,8 @@ public function getLocale() /** * Magic method to get the db entries already translated in the wanted locale. * - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * * @return */ diff --git a/src/app/Models/Traits/SpatieTranslatable/SlugService.php b/src/app/Models/Traits/SpatieTranslatable/SlugService.php index 8ec1a5de93..f5152e5228 100644 --- a/src/app/Models/Traits/SpatieTranslatable/SlugService.php +++ b/src/app/Models/Traits/SpatieTranslatable/SlugService.php @@ -9,8 +9,8 @@ class SlugService extends \Cviebrock\EloquentSluggable\Services\SlugService /** * Slug the current model. * - * @param \Illuminate\Database\Eloquent\Model $model - * @param bool $force + * @param \Illuminate\Database\Eloquent\Model $model + * @param bool $force * * @return bool */ @@ -43,9 +43,9 @@ public function slug(Model $model, bool $force = false): bool /** * Checks if the slug should be unique, and makes it so if needed. * - * @param string $slug - * @param array $config - * @param string $attribute + * @param string $slug + * @param array $config + * @param string $attribute * * @return string */ diff --git a/src/app/Models/Traits/SpatieTranslatable/Sluggable.php b/src/app/Models/Traits/SpatieTranslatable/Sluggable.php index 1454f31204..f74f324d5a 100644 --- a/src/app/Models/Traits/SpatieTranslatable/Sluggable.php +++ b/src/app/Models/Traits/SpatieTranslatable/Sluggable.php @@ -22,7 +22,7 @@ public static function bootSluggable() /** * Clone the model into a new, non-existing instance. * - * @param array|null $except + * @param array|null $except * * @return Model */ @@ -37,11 +37,11 @@ public function replicate(array $except = null): Model /** * Query scope for finding "similar" slugs, used to determine uniqueness. * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $attribute - * @param array $config - * @param string $slug + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $attribute + * @param array $config + * @param string $slug * * @return \Illuminate\Database\Eloquent\Builder */ diff --git a/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php b/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php index 16dddd1412..d011f55881 100644 --- a/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php +++ b/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php @@ -20,8 +20,8 @@ class SluggableObserver extends \Cviebrock\EloquentSluggable\SluggableObserver /** * SluggableObserver constructor. * - * @param \Cviebrock\EloquentSluggable\Services\SlugService $slugService - * @param \Illuminate\Contracts\Events\Dispatcher $events + * @param \Cviebrock\EloquentSluggable\Services\SlugService $slugService + * @param \Illuminate\Contracts\Events\Dispatcher $events */ public function __construct(SlugService $slugService, Dispatcher $events) { @@ -30,7 +30,7 @@ public function __construct(SlugService $slugService, Dispatcher $events) } /** - * @param \Illuminate\Database\Eloquent\Model $model + * @param \Illuminate\Database\Eloquent\Model $model * * @return bool|null */ @@ -40,8 +40,8 @@ public function saving(Model $model) } /** - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $event + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $event * * @return bool|null */ @@ -59,8 +59,8 @@ protected function generateSlug(Model $model, string $event) /** * Fire the namespaced validating event. * - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $event + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $event * * @return mixed */ @@ -72,8 +72,8 @@ protected function fireSluggingEvent(Model $model, string $event) /** * Fire the namespaced post-validation event. * - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $status + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $status * * @return void */ diff --git a/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php b/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php index 8dcd5b0922..6dffedc094 100644 --- a/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php +++ b/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php @@ -12,8 +12,8 @@ trait SluggableScopeHelpers /** * Query scope for finding a model by its primary slug. * - * @param \Illuminate\Database\Eloquent\Builder $scope - * @param string $slug + * @param \Illuminate\Database\Eloquent\Builder $scope + * @param string $slug * * @return \Illuminate\Database\Eloquent\Builder */ @@ -25,8 +25,8 @@ public function scopeWhereSlug(Builder $scope, string $slug): Builder /** * Find a model by its primary slug. * - * @param string $slug - * @param array $columns + * @param string $slug + * @param array $columns * * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null */ @@ -38,8 +38,8 @@ public static function findBySlug(string $slug, array $columns = ['*']) /** * Find a model by its primary slug or throw an exception. * - * @param string $slug - * @param array $columns + * @param string $slug + * @param array $columns * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * diff --git a/src/helpers.php b/src/helpers.php index a35deb4b85..4e677f9c13 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -176,8 +176,8 @@ function backpack_user() * Capitalize the first letter of a string, * even if that string is multi-byte (non-latin alphabet). * - * @param string $string String to have its first letter capitalized. - * @param encoding $encoding Character encoding + * @param string $string String to have its first letter capitalized. + * @param encoding $encoding Character encoding * * @return string String with first letter capitalized. */ diff --git a/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php b/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php index 1d02b10ad3..89d4c0d8da 100644 --- a/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php +++ b/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php @@ -39,7 +39,7 @@ protected function setUp(): void /** * Define environment setup. * - * @param \Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * * @return void */ @@ -51,8 +51,8 @@ protected function getEnvironmentSetUp($app) /** * Assert that the attributes of a model entry are equal to the expected array of attributes. * - * @param array $expected attributes - * @param \Illuminate\Database\Eloquent\Model $actual model + * @param array $expected attributes + * @param \Illuminate\Database\Eloquent\Model $actual model */ protected function assertEntryEquals($expected, $actual) { From 574ac5e419be923f7e0a67020b97f1962f395c60 Mon Sep 17 00:00:00 2001 From: Cristian Tabacitu Date: Fri, 10 Sep 2021 10:15:03 +0300 Subject: [PATCH 5/6] Revert "Apply fixes from StyleCI" This reverts commit cdf16a1ec835b263cffa1bbb4424b7f0acc9071d. --- src/BackpackServiceProvider.php | 4 +- src/Stats.php | 12 ++-- .../Commands/AddCustomRouteContent.php | 6 +- .../Console/Commands/AddSidebarContent.php | 6 +- .../Commands/PublishBackpackMiddleware.php | 6 +- src/app/Console/Commands/PublishView.php | 2 +- .../Commands/Traits/PrettyCommandOutput.php | 18 ++--- src/app/Console/Commands/Version.php | 2 +- .../Http/Controllers/Auth/LoginController.php | 2 +- .../Controllers/Auth/RegisterController.php | 6 +- .../Auth/ResetPasswordController.php | 6 +- src/app/Http/Controllers/ChartController.php | 4 +- src/app/Http/Controllers/CrudController.php | 6 +- .../Operations/BulkCloneOperation.php | 8 +-- .../Operations/BulkDeleteOperation.php | 6 +- .../Controllers/Operations/CloneOperation.php | 8 +-- .../Operations/CreateOperation.php | 6 +- .../Operations/DeleteOperation.php | 8 +-- .../Controllers/Operations/FetchOperation.php | 8 +-- .../Operations/InlineCreateOperation.php | 6 +- .../Controllers/Operations/ListOperation.php | 6 +- .../Operations/ReorderOperation.php | 6 +- .../Controllers/Operations/ShowOperation.php | 8 +-- .../Operations/UpdateOperation.php | 8 +-- src/app/Http/Middleware/CheckIfAdmin.php | 4 +- ...packAuthGuardInsteadOfDefaultAuthGuard.php | 6 +- .../Http/Requests/ChangePasswordRequest.php | 2 +- src/app/Library/CrudPanel/CrudButton.php | 32 ++++----- src/app/Library/CrudPanel/CrudColumn.php | 18 ++--- src/app/Library/CrudPanel/CrudField.php | 20 +++--- src/app/Library/CrudPanel/CrudFilter.php | 48 +++++++------- src/app/Library/CrudPanel/CrudPanel.php | 50 +++++++------- src/app/Library/CrudPanel/Traits/Access.php | 12 ++-- src/app/Library/CrudPanel/Traits/AutoSet.php | 6 +- src/app/Library/CrudPanel/Traits/Buttons.php | 46 ++++++------- src/app/Library/CrudPanel/Traits/Columns.php | 56 ++++++++-------- .../Traits/ColumnsProtectedMethods.php | 38 +++++------ src/app/Library/CrudPanel/Traits/Create.php | 20 +++--- src/app/Library/CrudPanel/Traits/Delete.php | 2 +- .../Library/CrudPanel/Traits/FakeFields.php | 12 ++-- src/app/Library/CrudPanel/Traits/Fields.php | 66 +++++++++---------- .../CrudPanel/Traits/FieldsPrivateMethods.php | 12 ++-- .../Traits/FieldsProtectedMethods.php | 28 ++++---- src/app/Library/CrudPanel/Traits/Filters.php | 50 +++++++------- .../CrudPanel/Traits/HeadingsAndTitles.php | 18 ++--- .../Library/CrudPanel/Traits/Macroable.php | 4 +- .../Library/CrudPanel/Traits/Operations.php | 14 ++-- src/app/Library/CrudPanel/Traits/Query.php | 20 +++--- src/app/Library/CrudPanel/Traits/Read.php | 6 +- .../CrudPanel/Traits/Relationships.php | 14 ++-- src/app/Library/CrudPanel/Traits/Reorder.php | 6 +- .../Library/CrudPanel/Traits/SaveActions.php | 28 ++++---- src/app/Library/CrudPanel/Traits/Search.php | 38 +++++------ src/app/Library/CrudPanel/Traits/Settings.php | 26 ++++---- src/app/Library/CrudPanel/Traits/Tabs.php | 2 +- src/app/Library/CrudPanel/Traits/Update.php | 10 +-- .../Library/CrudPanel/Traits/Validation.php | 10 +-- src/app/Library/CrudPanel/Traits/Views.php | 22 +++---- src/app/Library/Widget.php | 8 +-- src/app/Models/Traits/HasFakeFields.php | 4 +- .../Models/Traits/HasRelationshipFields.php | 6 +- src/app/Models/Traits/HasUploadFields.php | 16 ++--- .../SpatieTranslatable/HasTranslations.php | 12 ++-- .../Traits/SpatieTranslatable/SlugService.php | 10 +-- .../Traits/SpatieTranslatable/Sluggable.php | 12 ++-- .../SpatieTranslatable/SluggableObserver.php | 18 ++--- .../SluggableScopeHelpers.php | 12 ++-- src/helpers.php | 4 +- tests/Unit/CrudPanel/BaseDBCrudPanelTest.php | 6 +- 69 files changed, 506 insertions(+), 506 deletions(-) diff --git a/src/BackpackServiceProvider.php b/src/BackpackServiceProvider.php index eefae4b259..6c45c03350 100644 --- a/src/BackpackServiceProvider.php +++ b/src/BackpackServiceProvider.php @@ -141,7 +141,7 @@ public function publishFiles() /** * Define the routes for the application. * - * @param \Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * * @return void */ @@ -161,7 +161,7 @@ public function setupRoutes(Router $router) /** * Load custom routes file. * - * @param \Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * * @return void */ diff --git a/src/Stats.php b/src/Stats.php index 544576da48..1643de8501 100644 --- a/src/Stats.php +++ b/src/Stats.php @@ -82,9 +82,9 @@ private function sendUsageStats() * It spins up a separate process for this, and doesn't listen for a reponse, * so it has minimal to no impact on pageload. * - * @param string $method HTTP Method to use for the request. - * @param string $url URL to point the request at. - * @param array $payload The data you want sent to the URL. + * @param string $method HTTP Method to use for the request. + * @param string $url URL to point the request at. + * @param array $payload The data you want sent to the URL. * * @return void */ @@ -107,9 +107,9 @@ private function makeCurlRequest($method, $url, $payload) * geographic location this is usually slower than CURL. However, * unlike CURL, it works on most machines, so it's reliable. * - * @param string $method HTTP Method to use for the request. - * @param string $url URL to point the request at. - * @param array $payload The data you want sent to the URL. + * @param string $method HTTP Method to use for the request. + * @param string $url URL to point the request at. + * @param array $payload The data you want sent to the URL. * * @return void */ diff --git a/src/app/Console/Commands/AddCustomRouteContent.php b/src/app/Console/Commands/AddCustomRouteContent.php index 75d57b42e2..93d919881a 100644 --- a/src/app/Console/Commands/AddCustomRouteContent.php +++ b/src/app/Console/Commands/AddCustomRouteContent.php @@ -115,9 +115,9 @@ private function customRoutesFileEndLine($file_lines) /** * Parse the given file stream and return the line number where a string is found. * - * @param string $needle The string that's being searched for. - * @param array $haystack The file where the search is being performed. - * @return bool|int The last line number where the string was found. Or false. + * @param string $needle The string that's being searched for. + * @param array $haystack The file where the search is being performed. + * @return bool|int The last line number where the string was found. Or false. */ private function getLastLineNumberThatContains($needle, $haystack) { diff --git a/src/app/Console/Commands/AddSidebarContent.php b/src/app/Console/Commands/AddSidebarContent.php index 15dcc931e8..2a03a45dce 100644 --- a/src/app/Console/Commands/AddSidebarContent.php +++ b/src/app/Console/Commands/AddSidebarContent.php @@ -65,9 +65,9 @@ public function handle() /** * Parse the given file stream and return the line number where a string is found. * - * @param string $needle The string that's being searched for. - * @param array $haystack The file where the search is being performed. - * @return bool|int The last line number where the string was found. Or false. + * @param string $needle The string that's being searched for. + * @param array $haystack The file where the search is being performed. + * @return bool|int The last line number where the string was found. Or false. */ private function getLastLineNumberThatContains($needle, $haystack) { diff --git a/src/app/Console/Commands/PublishBackpackMiddleware.php b/src/app/Console/Commands/PublishBackpackMiddleware.php index 4839e223cc..bd44191527 100644 --- a/src/app/Console/Commands/PublishBackpackMiddleware.php +++ b/src/app/Console/Commands/PublishBackpackMiddleware.php @@ -55,7 +55,7 @@ public function handle() /** * Build the class. Replace Backpack namespace with App one. * - * @param string $name + * @param string $name * * @return string */ @@ -70,8 +70,8 @@ protected function buildClass($name = false) * Replace the namespace for the given stub. * Replace the User model, if it was moved to App\Models\User. * - * @param string $stub - * @param string $name + * @param string $stub + * @param string $name * * @return $this */ diff --git a/src/app/Console/Commands/PublishView.php b/src/app/Console/Commands/PublishView.php index 553db1fd97..ed0b9d2f9f 100644 --- a/src/app/Console/Commands/PublishView.php +++ b/src/app/Console/Commands/PublishView.php @@ -67,7 +67,7 @@ public function handle() /** * Take a blade file from the vendor folder and publish it to the resources folder. * - * @param string $file The filename without extension + * @param string $file The filename without extension * * @return void */ diff --git a/src/app/Console/Commands/Traits/PrettyCommandOutput.php b/src/app/Console/Commands/Traits/PrettyCommandOutput.php index 374c270c04..997d794de4 100644 --- a/src/app/Console/Commands/Traits/PrettyCommandOutput.php +++ b/src/app/Console/Commands/Traits/PrettyCommandOutput.php @@ -12,9 +12,9 @@ trait PrettyCommandOutput /** * Run a SSH command. * - * @param string $command The SSH command that needs to be run - * @param bool $beforeNotice Information for the user before the command is run - * @param bool $afterNotice Information for the user after the command is run + * @param string $command The SSH command that needs to be run + * @param bool $beforeNotice Information for the user before the command is run + * @param bool $afterNotice Information for the user after the command is run * * @return mixed Command-line output */ @@ -51,10 +51,10 @@ public function executeProcess($command, $beforeNotice = false, $afterNotice = f /** * Run an artisan command. * - * @param string $command The artisan command to be run. - * @param array $arguments Key-value array of arguments to the artisan command. - * @param bool $beforeNotice Information for the user before the command is run - * @param bool $afterNotice Information for the user after the command is run + * @param string $command The artisan command to be run. + * @param array $arguments Key-value array of arguments to the artisan command. + * @param bool $beforeNotice Information for the user before the command is run + * @param bool $afterNotice Information for the user after the command is run * * @return mixed Command-line output */ @@ -82,8 +82,8 @@ public function executeArtisanProcess($command, $arguments = [], $beforeNotice = /** * Write text to the screen for the user to see. * - * @param string $type line, info, comment, question, error - * @param string $content + * @param string $type line, info, comment, question, error + * @param string $content */ public function echo($type, $content) { diff --git a/src/app/Console/Commands/Version.php b/src/app/Console/Commands/Version.php index 4c80486b2d..e74c653251 100644 --- a/src/app/Console/Commands/Version.php +++ b/src/app/Console/Commands/Version.php @@ -44,7 +44,7 @@ public function handle() /** * Run a shell command in a separate process. * - * @param string $command Text to be executed. + * @param string $command Text to be executed. * * @return void */ diff --git a/src/app/Http/Controllers/Auth/LoginController.php b/src/app/Http/Controllers/Auth/LoginController.php index 578368d728..38a2f12328 100644 --- a/src/app/Http/Controllers/Auth/LoginController.php +++ b/src/app/Http/Controllers/Auth/LoginController.php @@ -65,7 +65,7 @@ public function username() /** * The user has logged out of the application. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * * @return mixed */ diff --git a/src/app/Http/Controllers/Auth/RegisterController.php b/src/app/Http/Controllers/Auth/RegisterController.php index e35242d6ea..d894981fac 100644 --- a/src/app/Http/Controllers/Auth/RegisterController.php +++ b/src/app/Http/Controllers/Auth/RegisterController.php @@ -43,7 +43,7 @@ public function __construct() /** * Get a validator for an incoming registration request. * - * @param array $data + * @param array $data * * @return \Illuminate\Contracts\Validation\Validator */ @@ -64,7 +64,7 @@ protected function validator(array $data) /** * Create a new user instance after a valid registration. * - * @param array $data + * @param array $data * * @return User */ @@ -100,7 +100,7 @@ public function showRegistrationForm() /** * Handle a registration request for the application. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * * @return \Illuminate\Http\Response */ diff --git a/src/app/Http/Controllers/Auth/ResetPasswordController.php b/src/app/Http/Controllers/Auth/ResetPasswordController.php index aa782bac13..1531188c23 100644 --- a/src/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/src/app/Http/Controllers/Auth/ResetPasswordController.php @@ -27,7 +27,7 @@ class ResetPasswordController extends Controller /** * Get the path the user should be redirected to after password reset. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request * * @return string */ @@ -64,8 +64,8 @@ public function __construct() * * If no token is present, display the link request form. * - * @param \Illuminate\Http\Request $request - * @param string|null $token + * @param \Illuminate\Http\Request $request + * @param string|null $token * * @return \Illuminate\Http\Response */ diff --git a/src/app/Http/Controllers/ChartController.php b/src/app/Http/Controllers/ChartController.php index 1bd2f56f37..5fa4562353 100644 --- a/src/app/Http/Controllers/ChartController.php +++ b/src/app/Http/Controllers/ChartController.php @@ -51,7 +51,7 @@ public function getLibraryFilePath() * Set the path where the chart widget will find the JS file (or files) * needeed to set up the charting. * - * @param string|array $path Full URL to the JS file of the charting library. Or array. + * @param string|array $path Full URL to the JS file of the charting library. Or array. */ protected function setLibraryFilePath($path) { @@ -63,7 +63,7 @@ protected function setLibraryFilePath($path) * Because the dataset always includes the name of the charting library, * we can use that to determine which JS file we should be loading from the CDN. * - * @param string $dataset Class name of the dataset of the current chart. + * @param string $dataset Class name of the dataset of the current chart. */ protected function setLibraryFilePathFromDatasetType($dataset) { diff --git a/src/app/Http/Controllers/CrudController.php b/src/app/Http/Controllers/CrudController.php index 4b6ea4d8f4..3687298fcf 100644 --- a/src/app/Http/Controllers/CrudController.php +++ b/src/app/Http/Controllers/CrudController.php @@ -55,9 +55,9 @@ public function setup() * Load routes for all operations. * Allow developers to load extra routes by creating a method that looks like setupOperationNameRoutes. * - * @param string $segment Name of the current entity (singular). - * @param string $routeName Route name prefix (ends with .). - * @param string $controller Name of the current controller. + * @param string $segment Name of the current entity (singular). + * @param string $routeName Route name prefix (ends with .). + * @param string $controller Name of the current controller. */ public function setupRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/BulkCloneOperation.php b/src/app/Http/Controllers/Operations/BulkCloneOperation.php index 0daecb7b0d..9fe64dcc84 100644 --- a/src/app/Http/Controllers/Operations/BulkCloneOperation.php +++ b/src/app/Http/Controllers/Operations/BulkCloneOperation.php @@ -9,9 +9,9 @@ trait BulkCloneOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupBulkCloneRoutes($segment, $routeName, $controller) { @@ -42,7 +42,7 @@ protected function setupBulkCloneDefaults() /** * Create duplicates of multiple entries in the datatabase. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Controllers/Operations/BulkDeleteOperation.php b/src/app/Http/Controllers/Operations/BulkDeleteOperation.php index 948150bdc8..27418034d1 100644 --- a/src/app/Http/Controllers/Operations/BulkDeleteOperation.php +++ b/src/app/Http/Controllers/Operations/BulkDeleteOperation.php @@ -9,9 +9,9 @@ trait BulkDeleteOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupBulkDeleteRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/CloneOperation.php b/src/app/Http/Controllers/Operations/CloneOperation.php index 3bdb7fb598..7971de2d24 100644 --- a/src/app/Http/Controllers/Operations/CloneOperation.php +++ b/src/app/Http/Controllers/Operations/CloneOperation.php @@ -9,9 +9,9 @@ trait CloneOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupCloneRoutes($segment, $routeName, $controller) { @@ -41,7 +41,7 @@ protected function setupCloneDefaults() /** * Create a duplicate of the current entry in the datatabase. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Controllers/Operations/CreateOperation.php b/src/app/Http/Controllers/Operations/CreateOperation.php index 1dae765123..90000c6946 100644 --- a/src/app/Http/Controllers/Operations/CreateOperation.php +++ b/src/app/Http/Controllers/Operations/CreateOperation.php @@ -9,9 +9,9 @@ trait CreateOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupCreateRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/DeleteOperation.php b/src/app/Http/Controllers/Operations/DeleteOperation.php index d5115a7251..1a5170d7fc 100644 --- a/src/app/Http/Controllers/Operations/DeleteOperation.php +++ b/src/app/Http/Controllers/Operations/DeleteOperation.php @@ -9,9 +9,9 @@ trait DeleteOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupDeleteRoutes($segment, $routeName, $controller) { @@ -41,7 +41,7 @@ protected function setupDeleteDefaults() /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id * * @return string */ diff --git a/src/app/Http/Controllers/Operations/FetchOperation.php b/src/app/Http/Controllers/Operations/FetchOperation.php index c1a5de0725..a81ad8c886 100644 --- a/src/app/Http/Controllers/Operations/FetchOperation.php +++ b/src/app/Http/Controllers/Operations/FetchOperation.php @@ -10,9 +10,9 @@ trait FetchOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupFetchOperationRoutes($segment, $routeName, $controller) { @@ -34,7 +34,7 @@ protected function setupFetchOperationRoutes($segment, $routeName, $controller) /** * Gets items from database and returns to selects. * - * @param string|array $arg + * @param string|array $arg * @return \Illuminate\Http\JsonResponse|Illuminate\Database\Eloquent\Collection|Illuminate\Pagination\LengthAwarePaginator */ private function fetch($arg) diff --git a/src/app/Http/Controllers/Operations/InlineCreateOperation.php b/src/app/Http/Controllers/Operations/InlineCreateOperation.php index fcb14b0706..8a30a74c56 100644 --- a/src/app/Http/Controllers/Operations/InlineCreateOperation.php +++ b/src/app/Http/Controllers/Operations/InlineCreateOperation.php @@ -10,9 +10,9 @@ trait InlineCreateOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupInlineCreateRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/ListOperation.php b/src/app/Http/Controllers/Operations/ListOperation.php index defac73447..2bb11274c9 100644 --- a/src/app/Http/Controllers/Operations/ListOperation.php +++ b/src/app/Http/Controllers/Operations/ListOperation.php @@ -9,9 +9,9 @@ trait ListOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupListRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/ReorderOperation.php b/src/app/Http/Controllers/Operations/ReorderOperation.php index cdac357bac..a5ab71ab1b 100644 --- a/src/app/Http/Controllers/Operations/ReorderOperation.php +++ b/src/app/Http/Controllers/Operations/ReorderOperation.php @@ -9,9 +9,9 @@ trait ReorderOperation /** * Define which routes are needed for this operation. * - * @param string $name Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $name Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupReorderRoutes($segment, $routeName, $controller) { diff --git a/src/app/Http/Controllers/Operations/ShowOperation.php b/src/app/Http/Controllers/Operations/ShowOperation.php index d6a0199e56..0c6bb5a5ae 100644 --- a/src/app/Http/Controllers/Operations/ShowOperation.php +++ b/src/app/Http/Controllers/Operations/ShowOperation.php @@ -9,9 +9,9 @@ trait ShowOperation /** * Define which routes are needed for this operation. * - * @param string $segment Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $segment Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupShowRoutes($segment, $routeName, $controller) { @@ -61,7 +61,7 @@ protected function setupShowDefaults() /** * Display the specified resource. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Controllers/Operations/UpdateOperation.php b/src/app/Http/Controllers/Operations/UpdateOperation.php index 80c99a13eb..71076ea8ba 100644 --- a/src/app/Http/Controllers/Operations/UpdateOperation.php +++ b/src/app/Http/Controllers/Operations/UpdateOperation.php @@ -9,9 +9,9 @@ trait UpdateOperation /** * Define which routes are needed for this operation. * - * @param string $name Name of the current entity (singular). Used as first URL segment. - * @param string $routeName Prefix of the route name. - * @param string $controller Name of the current CrudController. + * @param string $name Name of the current entity (singular). Used as first URL segment. + * @param string $routeName Prefix of the route name. + * @param string $controller Name of the current CrudController. */ protected function setupUpdateRoutes($segment, $routeName, $controller) { @@ -57,7 +57,7 @@ protected function setupUpdateDefaults() /** * Show the form for editing the specified resource. * - * @param int $id + * @param int $id * * @return Response */ diff --git a/src/app/Http/Middleware/CheckIfAdmin.php b/src/app/Http/Middleware/CheckIfAdmin.php index 008c881ac6..4ea45bd84d 100644 --- a/src/app/Http/Middleware/CheckIfAdmin.php +++ b/src/app/Http/Middleware/CheckIfAdmin.php @@ -51,8 +51,8 @@ private function respondToUnauthorizedRequest($request) /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next + * @param \Illuminate\Http\Request $request + * @param \Closure $next * * @return mixed */ diff --git a/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php b/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php index 2e449526bf..3c94184df7 100644 --- a/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php +++ b/src/app/Http/Middleware/UseBackpackAuthGuardInsteadOfDefaultAuthGuard.php @@ -9,9 +9,9 @@ class UseBackpackAuthGuardInsteadOfDefaultAuthGuard /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null $guard + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard * * @return mixed */ diff --git a/src/app/Http/Requests/ChangePasswordRequest.php b/src/app/Http/Requests/ChangePasswordRequest.php index 8fd70dba84..abf9f03431 100644 --- a/src/app/Http/Requests/ChangePasswordRequest.php +++ b/src/app/Http/Requests/ChangePasswordRequest.php @@ -35,7 +35,7 @@ public function rules() /** * Configure the validator instance. * - * @param \Illuminate\Validation\Validator $validator + * @param \Illuminate\Validation\Validator $validator * * @return void */ diff --git a/src/app/Library/CrudPanel/CrudButton.php b/src/app/Library/CrudPanel/CrudButton.php index 2c7b9450c3..5b90e1edd0 100644 --- a/src/app/Library/CrudPanel/CrudButton.php +++ b/src/app/Library/CrudPanel/CrudButton.php @@ -50,7 +50,7 @@ public function __construct($name, $stack = null, $type = null, $content = null, /** * Add a new button to the default stack. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. */ public static function name($attributes = null) { @@ -60,7 +60,7 @@ public static function name($attributes = null) /** * Add a new button to the default stack. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. */ public static function add($attributes = null) { @@ -78,7 +78,7 @@ public static function add($attributes = null) * div button. But they don't want them added to the before_content of after_content * stacks. So what they do is basically add them to a 'hidden' stack, that nobody will ever see. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. * @return CrudButton */ public static function make($attributes = null) @@ -96,7 +96,7 @@ public static function make($attributes = null) /** * Set the button stack (where the button will be shown). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * @return CrudButton */ public function stack($stack) @@ -109,7 +109,7 @@ public function stack($stack) /** * Sets the button type (view or model_function). * - * @param string $type The type of button - view or model_function. + * @param string $type The type of button - view or model_function. * @return CrudButton */ public function type($type) @@ -124,7 +124,7 @@ public function type($type) * For the view button type, set it to the view path, including namespace. * For the model_function button type, set it to the name of the method on the model. * - * @param string $content Path to view or name of method on Model. + * @param string $content Path to view or name of method on Model. * @return CrudButton */ public function content($content) @@ -138,7 +138,7 @@ public function content($content) * Sets the namespace and path of the view for this button. * Sets the button type as 'view'. * - * @param string $value Path to view file. + * @param string $value Path to view file. * @return CrudButton */ public function view($value) @@ -153,7 +153,7 @@ public function view($value) * Sets the name of the method on the model that contains the HTML for this button. * Sets the button type as 'model_function'. * - * @param string $value Name of the method on the model. + * @param string $value Name of the method on the model. * @return CrudButton */ public function modelFunction($value) @@ -170,7 +170,7 @@ public function modelFunction($value) * Sets the button type as 'model_function'. * Alias of the modelFunction() method. * - * @param string $value Name of the method on the model. + * @param string $value Name of the method on the model. * @return CrudButton */ public function model_function($value) @@ -182,7 +182,7 @@ public function model_function($value) * Unserts an property that is set on the current button. * Possible properties: name, stack, type, content. * - * @param string $property Name of the property that should be cleared. + * @param string $property Name of the property that should be cleared. * @return CrudButton */ public function forget($property) @@ -200,7 +200,7 @@ public function forget($property) * Moves the button to a certain button stack. * Alias of stack(). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * * @return self */ @@ -213,7 +213,7 @@ public function to($stack) * Moves the button to a certain button stack. * Alias of stack(). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * * @return self */ @@ -226,7 +226,7 @@ public function group($stack) * Moves the button to a certain button stack. * Alias of stack(). * - * @param string $stack The name of the stack where the button should be moved. + * @param string $stack The name of the stack where the button should be moved. * * @return self */ @@ -243,7 +243,7 @@ public function section($stack) * Get the end result that should be displayed to the user. * The HTML itself of the button. * - * @param object|null $entry The eloquent Model for the current entry or null if no current entry. + * @param object|null $entry The eloquent Model for the current entry or null if no current entry. * * @return HTML */ @@ -315,7 +315,7 @@ public function makeLast() /** * Move the current filter after another filter. * - * @param string $destination Name of the destination filter. + * @param string $destination Name of the destination filter. * @return CrudFilter */ public function after($destination) @@ -328,7 +328,7 @@ public function after($destination) /** * Move the current field before another field. * - * @param string $destination Name of the destination field. + * @param string $destination Name of the destination field. * @return CrudFilter */ public function before($destination) diff --git a/src/app/Library/CrudPanel/CrudColumn.php b/src/app/Library/CrudPanel/CrudColumn.php index 048cf092f4..caf94577ae 100644 --- a/src/app/Library/CrudPanel/CrudColumn.php +++ b/src/app/Library/CrudPanel/CrudColumn.php @@ -58,7 +58,7 @@ public function crud() /** * Create a CrudColumn object with the parameter as its name. * - * @param string $name Name of the column in the db, or model attribute. + * @param string $name Name of the column in the db, or model attribute. * @return CrudColumn */ public static function name($name) @@ -79,7 +79,7 @@ public function remove() /** * Remove an attribute from the column definition array. * - * @param string $attribute Name of the attribute being removed + * @param string $attribute Name of the attribute being removed * @return CrudColumn */ public function forget($attribute) @@ -92,7 +92,7 @@ public function forget($attribute) /** * Move the current column after another column. * - * @param string $destinationColumn Name of the destination column. + * @param string $destinationColumn Name of the destination column. * @return CrudColumn */ public function after($destinationColumn) @@ -106,7 +106,7 @@ public function after($destinationColumn) /** * Move the current column before another column. * - * @param string $destinationColumn Name of the destination column. + * @param string $destinationColumn Name of the destination column. * @return CrudColumn */ public function before($destinationColumn) @@ -181,8 +181,8 @@ public function dd() /** * Set the value for a certain attribute on the CrudColumn object. * - * @param string $attribute Name of the attribute. - * @param mixed $value Value of that attribute. + * @param string $attribute Name of the attribute. + * @param mixed $value Value of that attribute. */ private function setAttributeValue($attribute, $value) { @@ -193,7 +193,7 @@ private function setAttributeValue($attribute, $value) * Replace all column attributes on the CrudColumn object * with the given array of attribute-value pairs. * - * @param array $array Array of attributes and their values. + * @param array $array Array of attributes and their values. */ private function setAllAttributeValues($array) { @@ -229,8 +229,8 @@ private function save() * * Eg: type('number') will set the "type" attribute to "number" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return CrudColumn */ diff --git a/src/app/Library/CrudPanel/CrudField.php b/src/app/Library/CrudPanel/CrudField.php index d94f27e557..e6872acc68 100644 --- a/src/app/Library/CrudPanel/CrudField.php +++ b/src/app/Library/CrudPanel/CrudField.php @@ -55,7 +55,7 @@ public function crud() /** * Create a CrudField object with the parameter as its name. * - * @param string $name Name of the column in the db, or model attribute. + * @param string $name Name of the column in the db, or model attribute. * @return CrudField */ public static function name($name) @@ -76,7 +76,7 @@ public function remove() /** * Remove an attribute from the current field definition array. * - * @param string $attribute Name of the attribute being removed. + * @param string $attribute Name of the attribute being removed. * @return CrudField */ public function forget($attribute) @@ -89,7 +89,7 @@ public function forget($attribute) /** * Move the current field after another field. * - * @param string $destinationField Name of the destination field. + * @param string $destinationField Name of the destination field. * @return CrudField */ public function after($destinationField) @@ -103,7 +103,7 @@ public function after($destinationField) /** * Move the current field before another field. * - * @param string $destinationField Name of the destination field. + * @param string $destinationField Name of the destination field. * @return CrudField */ public function before($destinationField) @@ -152,7 +152,7 @@ public function makeLast() * ->wrapper(['class' => 'form-group col-md-6']) * ->size(6). * - * @param int $numberOfColumns How many columns should this field span across (1-12)? + * @param int $numberOfColumns How many columns should this field span across (1-12)? * @return CrudField */ public function size($numberOfColumns) @@ -169,8 +169,8 @@ public function size($numberOfColumns) /** * Set the value for a certain attribute on the CrudField object. * - * @param string $attribute Name of the attribute. - * @param mixed $value Value of that attribute. + * @param string $attribute Name of the attribute. + * @param mixed $value Value of that attribute. */ private function setAttributeValue($attribute, $value) { @@ -181,7 +181,7 @@ private function setAttributeValue($attribute, $value) * Replace all field attributes on the CrudField object * with the given array of attribute-value pairs. * - * @param array $array Array of attributes and their values. + * @param array $array Array of attributes and their values. */ private function setAllAttributeValues($array) { @@ -248,8 +248,8 @@ public function dd() * * Eg: type('number') will set the "type" attribute to "number" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return CrudField */ diff --git a/src/app/Library/CrudPanel/CrudFilter.php b/src/app/Library/CrudPanel/CrudFilter.php index 6b965fdcac..6c7efa04e9 100644 --- a/src/app/Library/CrudPanel/CrudFilter.php +++ b/src/app/Library/CrudPanel/CrudFilter.php @@ -91,7 +91,7 @@ public function wasNotApplied() * Run the filter logic, default logic and/or fallback logic so that from this point on * the CRUD query has its results filtered, according to the Request. * - * @param array $input The GET parameters for which the filter should be applied. + * @param array $input The GET parameters for which the filter should be applied. * @return void */ public function apply($input = null) @@ -139,7 +139,7 @@ public function getViewWithNamespace() /** * Create a CrudFilter object with the parameter as its name. * - * @param string $name Name of the column in the db, or model attribute. + * @param string $name Name of the column in the db, or model attribute. * @return CrudPanel */ public static function name($name) @@ -160,7 +160,7 @@ public function remove() /** * Remove an attribute from the current filter definition array. * - * @param string $attribute Name of the attribute being removed. + * @param string $attribute Name of the attribute being removed. * @return CrudFilter */ public function forget($attribute) @@ -180,8 +180,8 @@ public function forget($attribute) /** * Remove an attribute from one field's definition array. - * @param string $field The name of the field. - * @param string $attribute The name of the attribute being removed. + * @param string $field The name of the field. + * @param string $attribute The name of the attribute being removed. */ public function removeFilterAttribute($filter, $attribute) { @@ -195,7 +195,7 @@ public function removeFilterAttribute($filter, $attribute) /** * Move the current filter after another filter. * - * @param string $destination Name of the destination filter. + * @param string $destination Name of the destination filter. * @return CrudFilter */ public function after($destination) @@ -208,7 +208,7 @@ public function after($destination) /** * Move the current field before another field. * - * @param string $destination Name of the destination field. + * @param string $destination Name of the destination field. * @return CrudFilter */ public function before($destination) @@ -250,7 +250,7 @@ public function makeLast() /** * Set the type of the filter. * - * @param string $value Name of blade view that shows the field. + * @param string $value Name of blade view that shows the field. * @return CrudFilter */ public function type($value) @@ -265,7 +265,7 @@ public function type($value) * Set the label of the filter - the element that the end-user can see and click * to activate the filter or an input that will activate the filter. * - * @param string $value A name for this filter that the end-user will understand. + * @param string $value A name for this filter that the end-user will understand. * @return CrudFilter */ public function label($value) @@ -280,7 +280,7 @@ public function label($value) * For example, the dropdown, select2 and select2 filters let the user select * pre-determined values to filter with. This is how to set those values that will be picked up. * - * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. + * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. * @return CrudFilter */ public function values($value) @@ -297,7 +297,7 @@ public function values($value) * * Alias of the values() method. * - * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. + * @param array|function $value Key-value array with values for the user to pick from, or a function which also return a Key-value array. * @return CrudFilter */ public function options($value) @@ -309,7 +309,7 @@ public function options($value) * Set the blade view that will be used by the filter. * Should NOT include the namespace, that's defined separately using 'viewNamespace'. * - * @param string $value Path to the blade file, after the view namespace. + * @param string $value Path to the blade file, after the view namespace. * @return CrudFilter */ public function view($value) @@ -323,7 +323,7 @@ public function view($value) * The path to the blade views directory where the filter file will be found. Ex: 'crud::filters' * Useful to load filters from a different package or directory. * - * @param string $value Blade path to the directory. + * @param string $value Blade path to the directory. * @return CrudFilter */ public function viewNamespace($value) @@ -336,7 +336,7 @@ public function viewNamespace($value) /** * Define what happens when the filter is active, through a closure. * - * @param Closure $value Closure that will be called when Request has this name as GET parameter. + * @param Closure $value Closure that will be called when Request has this name as GET parameter. * @return CrudFilter */ public function logic($value) @@ -349,7 +349,7 @@ public function logic($value) /** * Define what happens when the filter is NOT active, through a closure. * - * @param Closure $value Closure that will be called when Request does NOT have this name as GET parameter. + * @param Closure $value Closure that will be called when Request does NOT have this name as GET parameter. * @return CrudFilter */ public function fallbackLogic($value) @@ -362,7 +362,7 @@ public function fallbackLogic($value) /** * Define if the filter has already been applied (logic or fallbackLogic called). * - * @param bool $value Whether the filter has been run. + * @param bool $value Whether the filter has been run. * @return CrudFilter */ public function applied($value) @@ -425,8 +425,8 @@ private function crud() /** * Set the value for a certain attribute on the CrudFilter object. * - * @param string $attribute Name of the attribute. - * @param string $value Value of that attribute. + * @param string $attribute Name of the attribute. + * @param string $value Value of that attribute. */ private function setOptionValue($attribute, $value) { @@ -437,7 +437,7 @@ private function setOptionValue($attribute, $value) * Replace all field options on the CrudFilter object * with the given array of attribute-value pairs. * - * @param array $array Array of options and their values. + * @param array $array Array of options and their values. */ private function setAllOptionsValues($array) { @@ -463,9 +463,9 @@ private function save() } /** - * @param string $name - * @param string $operator - * @param array $input + * @param string $name + * @param string $operator + * @param array $input */ private function applyDefaultLogic($name, $operator, $input = null) { @@ -556,8 +556,8 @@ public function dd() * * Eg: type('number') will set the "type" attribute to "number" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return CrudFilter */ diff --git a/src/app/Library/CrudPanel/CrudPanel.php b/src/app/Library/CrudPanel/CrudPanel.php index b5142fd90d..cafdd704df 100644 --- a/src/app/Library/CrudPanel/CrudPanel.php +++ b/src/app/Library/CrudPanel/CrudPanel.php @@ -71,7 +71,7 @@ public function __construct() /** * Set the request instance for this CRUD. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request */ public function setRequest($request = null) { @@ -95,7 +95,7 @@ public function getRequest() * This function binds the CRUD to its corresponding Model (which extends Eloquent). * All Create-Read-Update-Delete operations are done using that Eloquent Collection. * - * @param string $model_namespace Full model namespace. Ex: App\Models\Article + * @param string $model_namespace Full model namespace. Ex: App\Models\Article * * @throws \Exception in case the model does not exist */ @@ -173,7 +173,7 @@ public function getSqlDriverList() * Set the route for this CRUD. * Ex: admin/article. * - * @param string $route Route name. + * @param string $route Route name. */ public function setRoute($route) { @@ -184,8 +184,8 @@ public function setRoute($route) * Set the route for this CRUD using the route name. * Ex: admin.article. * - * @param string $route Route name. - * @param array $parameters Parameters. + * @param string $route Route name. + * @param array $parameters Parameters. * * @throws \Exception */ @@ -219,8 +219,8 @@ public function getRoute() * Set the entity name in singular and plural. * Used all over the CRUD interface (header, add button, reorder button, breadcrumbs). * - * @param string $singular Entity name, in singular. Ex: article - * @param string $plural Entity name, in plural. Ex: articles + * @param string $singular Entity name, in singular. Ex: article + * @param string $plural Entity name, in plural. Ex: articles */ public function setEntityNameStrings($singular, $plural) { @@ -270,7 +270,7 @@ public function getActionMethod() * Check if the controller method being called * matches a given string. * - * @param string $methodName Name of the method (ex: index, create, update) + * @param string $methodName Name of the method (ex: index, create, update) * * @return bool Whether the condition is met or not. */ @@ -286,8 +286,8 @@ public function actionIs($methodName) /** * Return the first element in an array that has the given 'type' attribute. * - * @param string $type - * @param array $array + * @param string $type + * @param array $array * * @return array */ @@ -330,11 +330,11 @@ public function sync($type, $fields, $attributes) * App/Models/Address defined by a company() method on the user model and an address() method on the * company model, the 'App/Models/Address' string will be returned. * - * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. - * @param int $length Optionally specify the number of relations to omit from the start of the relation string. If - * the provided length is negative, then that many relations will be omitted from the end of the relation - * string. - * @param \Illuminate\Database\Eloquent\Model $model Optionally specify a different model than the one in the crud object. + * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. + * @param int $length Optionally specify the number of relations to omit from the start of the relation string. If + * the provided length is negative, then that many relations will be omitted from the end of the relation + * string. + * @param \Illuminate\Database\Eloquent\Model $model Optionally specify a different model than the one in the crud object. * * @return string Relation model name. */ @@ -367,11 +367,11 @@ public function getRelationModel($relationString, $length = null, $model = null) * Get the given attribute from a model or models resulting from the specified relation string (eg: the list of streets from * the many addresses of the company of a given user). * - * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). - * @param string $relationString Model relation. Can be a string representing the name of a relation method in the given - * Model or one from a different Model through multiple relations. A dot notation can be used to specify - * multiple relations (eg: user.company.address). - * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). + * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). + * @param string $relationString Model relation. Can be a string representing the name of a relation method in the given + * Model or one from a different Model through multiple relations. A dot notation can be used to specify + * multiple relations (eg: user.company.address). + * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). * * @return array An array containing a list of attributes from the resulting model. */ @@ -418,9 +418,9 @@ public function getRelatedEntriesAttributes($model, $relationString, $attribute) /** * Parse translatable attributes from a model or models resulting from the specified relation string. * - * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). - * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). - * @param string $value Attribute value translatable or not + * @param \Illuminate\Database\Eloquent\Model $model Model (eg: user). + * @param string $attribute The attribute from the relation model (eg: the street attribute from the address model). + * @param string $value Attribute value translatable or not * * @return string A string containing the translated attributed based on app()->getLocale() */ @@ -455,8 +455,8 @@ public function parseTranslatableAttributes($model, $attribute, $value) * Traverse the tree of relations for the given model, defined by the given relation string, and return the ending * associated model instance or instances. * - * @param \Illuminate\Database\Eloquent\Model $model The CRUD model. - * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. + * @param \Illuminate\Database\Eloquent\Model $model The CRUD model. + * @param string $relationString Relation string. A dot notation can be used to chain multiple relations. * * @return array An array of the associated model instances defined by the relation string. */ diff --git a/src/app/Library/CrudPanel/Traits/Access.php b/src/app/Library/CrudPanel/Traits/Access.php index 603fb43fe8..b6087df122 100644 --- a/src/app/Library/CrudPanel/Traits/Access.php +++ b/src/app/Library/CrudPanel/Traits/Access.php @@ -9,7 +9,7 @@ trait Access /** * Set an operation as having access using the Settings API. * - * @param array $operation + * @param array $operation * * @return bool */ @@ -25,7 +25,7 @@ public function allowAccess($operation) /** * Disable the access to a certain operation, or the current one. * - * @param array $operation [description] + * @param array $operation [description] * * @return [type] [description] */ @@ -41,7 +41,7 @@ public function denyAccess($operation) /** * Check if a operation is allowed for a Crud Panel. Return false if not. * - * @param string $operation + * @param string $operation * * @return bool */ @@ -53,7 +53,7 @@ public function hasAccess($operation) /** * Check if any operations are allowed for a Crud Panel. Return false if not. * - * @param array $operation_array + * @param array $operation_array * * @return bool */ @@ -71,7 +71,7 @@ public function hasAccessToAny($operation_array) /** * Check if all operations are allowed for a Crud Panel. Return false if not. * - * @param array $operation_array Permissions. + * @param array $operation_array Permissions. * * @return bool */ @@ -89,7 +89,7 @@ public function hasAccessToAll($operation_array) /** * Check if a operation is allowed for a Crud Panel. Fail if not. * - * @param string $operation + * @param string $operation * * @throws \Backpack\CRUD\Exception\AccessDeniedException in case the operation is not enabled * diff --git a/src/app/Library/CrudPanel/Traits/AutoSet.php b/src/app/Library/CrudPanel/Traits/AutoSet.php index 2b18a458dd..79b2ff5d6f 100644 --- a/src/app/Library/CrudPanel/Traits/AutoSet.php +++ b/src/app/Library/CrudPanel/Traits/AutoSet.php @@ -90,7 +90,7 @@ public function getDbTableColumns() /** * Infer a field type, judging from the database column type. * - * @param string $field Field name. + * @param string $field Field name. * * @return string Field type. */ @@ -177,7 +177,7 @@ public function setDoctrineTypesMapping() /** * Turn a database column name or PHP variable into a pretty label to be shown to the user. * - * @param string $value The value. + * @param string $value The value. * * @return string The transformed value. */ @@ -201,7 +201,7 @@ public function getLabel($value) /** * Change the way labels are made. * - * @param callable $labeller A function that receives a string and returns the formatted string, after stripping down useless characters. + * @param callable $labeller A function that receives a string and returns the formatted string, after stripping down useless characters. * * @return self */ diff --git a/src/app/Library/CrudPanel/Traits/Buttons.php b/src/app/Library/CrudPanel/Traits/Buttons.php index 5285079453..f3e75175b7 100644 --- a/src/app/Library/CrudPanel/Traits/Buttons.php +++ b/src/app/Library/CrudPanel/Traits/Buttons.php @@ -16,8 +16,8 @@ trait Buttons * they will be pushed to the end of the button collection. * * - * @param string $stack Stack where the buttons belongs. Options: top, line, bottom. - * @param array $order Ordered name of the buttons. ['update', 'delete', 'show'] + * @param string $stack Stack where the buttons belongs. Options: top, line, bottom. + * @param array $order Ordered name of the buttons. ['update', 'delete', 'show'] */ public function orderButtons(string $stack, array $order) { @@ -60,13 +60,13 @@ public function orderButtons(string $stack, array $order) /** * Add a button to the CRUD table view. * - * @param string $stack Where should the button be visible? Options: top, line, bottom. - * @param string $name The name of the button. Unique. - * @param string $type Type of button: view or model_function. - * @param string $content The HTML for the button. - * @param bool|string $position Position on the stack: beginning or end. If false, the position will be - * 'beginning' for the line stack or 'end' otherwise. - * @param bool $replaceExisting True if a button with the same name on the given stack should be replaced. + * @param string $stack Where should the button be visible? Options: top, line, bottom. + * @param string $name The name of the button. Unique. + * @param string $type Type of button: view or model_function. + * @param string $content The HTML for the button. + * @param bool|string $position Position on the stack: beginning or end. If false, the position will be + * 'beginning' for the line stack or 'end' otherwise. + * @param bool $replaceExisting True if a button with the same name on the given stack should be replaced. * * @return \Backpack\CRUD\app\Library\CrudPanel\CrudButton The new CRUD button. */ @@ -102,8 +102,8 @@ public function buttons() /** * Modify the attributes of a button. * - * @param string $name The button name. - * @param array $modifications The attributes and their new values. + * @param string $name The button name. + * @param array $modifications The attributes and their new values. * * @return CrudButton The button that has suffered the changes, for daisychaining methods. */ @@ -130,8 +130,8 @@ public function modifyButton($name, $modifications = null) /** * Remove a button from the CRUD panel. * - * @param string $name Button name. - * @param string $stack Optional stack name. + * @param string $name Button name. + * @param string $stack Optional stack name. */ public function removeButton($name, $stack = null) { @@ -141,8 +141,8 @@ public function removeButton($name, $stack = null) } /** - * @param array $names Button names - * @param string|null $stack Optional stack name. + * @param array $names Button names + * @param string|null $stack Optional stack name. */ public function removeButtons($names, $stack = null) { @@ -175,9 +175,9 @@ public function removeButtonFromStack($name, $stack) /** * Move the most recently added button before or after the given target button. Default is before. * - * @param string|array $target The target button name or array. - * @param string|array $destination The destination button name or array. - * @param bool $before If true, the button will be moved before the target button, otherwise it will be moved after it. + * @param string|array $target The target button name or array. + * @param string|array $destination The destination button name or array. + * @param bool $before If true, the button will be moved before the target button, otherwise it will be moved after it. */ public function moveButton($target, $where, $destination) { @@ -211,8 +211,8 @@ public function moveButton($target, $where, $destination) /** * Check if a filter exists, by any given attribute. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function hasButtonWhere($attribute, $value) @@ -223,8 +223,8 @@ public function hasButtonWhere($attribute, $value) /** * Get the first filter where a given attribute has the given value. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function firstButtonWhere($attribute, $value) @@ -246,7 +246,7 @@ public function getButtonKey($buttonName) /** * Add a new button to the current CRUD operation. * - * @param string|array $attributes Button name or array that contains name, stack, type and content. + * @param string|array $attributes Button name or array that contains name, stack, type and content. * @return \Backpack\CRUD\app\Library\CrudPanel\CrudButton */ public function button($attributes = null) diff --git a/src/app/Library/CrudPanel/Traits/Columns.php b/src/app/Library/CrudPanel/Traits/Columns.php index 2045f6909f..bf96aed7d5 100644 --- a/src/app/Library/CrudPanel/Traits/Columns.php +++ b/src/app/Library/CrudPanel/Traits/Columns.php @@ -26,7 +26,7 @@ public function columns() /** * Add a bunch of column names and their details to the CRUD object. * - * @param array|string $columns + * @param array|string $columns */ public function setColumns($columns) { @@ -61,7 +61,7 @@ public function setColumns($columns) /** * Add a column at the end of to the CRUD object's "columns" array. * - * @param array|string $column + * @param array|string $column * * @return self */ @@ -76,7 +76,7 @@ public function addColumn($column) /** * Add multiple columns at the end of the CRUD object's "columns" array. * - * @param array $columns + * @param array $columns */ public function addColumns($columns) { @@ -90,7 +90,7 @@ public function addColumns($columns) /** * Move the most recently added column after the given target column. * - * @param string|array $targetColumn The target column name or array. + * @param string|array $targetColumn The target column name or array. */ public function afterColumn($targetColumn) { @@ -100,7 +100,7 @@ public function afterColumn($targetColumn) /** * Move the most recently added column before the given target column. * - * @param string|array $targetColumn The target column name or array. + * @param string|array $targetColumn The target column name or array. */ public function beforeColumn($targetColumn) { @@ -125,7 +125,7 @@ public function makeFirstColumn() /** * Add the default column type to the given Column, inferring the type from the database column type. * - * @param array $column + * @param array $column * * @return array|bool */ @@ -143,7 +143,7 @@ public function addDefaultTypeToColumn($column) /** * Remove a column from the CRUD panel by name. * - * @param string $columnKey The column key. + * @param string $columnKey The column key. */ public function removeColumn($columnKey) { @@ -155,7 +155,7 @@ public function removeColumn($columnKey) /** * Remove multiple columns from the CRUD panel by name. * - * @param array $columns Array of column names. + * @param array $columns Array of column names. */ public function removeColumns($columns) { @@ -176,8 +176,8 @@ public function removeAllColumns() /** * Remove an attribute from one column's definition array. - * @param string $column The name of the column. - * @param string $attribute The name of the attribute being removed. + * @param string $column The name of the column. + * @param string $attribute The name of the attribute being removed. */ public function removeColumnAttribute($column, $attribute) { @@ -191,8 +191,8 @@ public function removeColumnAttribute($column, $attribute) /** * Change attributes for multiple columns. * - * @param array $columns - * @param array $attributes + * @param array $columns + * @param array $attributes */ public function setColumnsDetails($columns, $attributes) { @@ -204,8 +204,8 @@ public function setColumnsDetails($columns, $attributes) /** * Change attributes for a certain column. * - * @param string $columnKey Column key. - * @param array $attributesAndValues + * @param string $columnKey Column key. + * @param array $attributesAndValues */ public function setColumnDetails($columnKey, $attributesAndValues) { @@ -224,8 +224,8 @@ public function setColumnDetails($columnKey, $attributesAndValues) * Alias for setColumnDetails(). * Provides a consistent syntax with Fields, Buttons, Filters modify functionality. * - * @param string $column Column name. - * @param array $attributes + * @param string $column Column name. + * @param array $attributes */ public function modifyColumn($column, $attributes) { @@ -235,8 +235,8 @@ public function modifyColumn($column, $attributes) /** * Set label for a specific column. * - * @param string $column - * @param string $label + * @param string $column + * @param string $label */ public function setColumnLabel($column, $label) { @@ -261,7 +261,7 @@ public function getColumnsRelationships() * Order the CRUD columns. If certain columns are missing from the given order array, they will be pushed to the * new columns array in the original order. * - * @param array $order An array of column names in the desired order. + * @param array $order An array of column names in the desired order. */ public function orderColumns($order) { @@ -283,7 +283,7 @@ public function orderColumns($order) /** * Get a column by the id, from the associative array. * - * @param int $column_number Placement inside the columns array. + * @param int $column_number Placement inside the columns array. * * @return array Column details. */ @@ -309,7 +309,7 @@ public function getActionsColumnPriority() * Set a certain priority for the actions column * in the CRUD table view. Usually set to 10000 in order to hide it. * - * @param int $number The priority, from 1 to infinity. Lower is better. + * @param int $number The priority, from 1 to infinity. Lower is better. * * @return self */ @@ -323,8 +323,8 @@ public function setActionsColumnPriority($number) /** * Check if a column exists, by any given attribute. * - * @param string $attribute Attribute name on that column definition array. - * @param string $value Value of that attribute on that column definition array. + * @param string $attribute Attribute name on that column definition array. + * @param string $value Value of that attribute on that column definition array. * @return bool */ public function hasColumnWhere($attribute, $value) @@ -339,8 +339,8 @@ public function hasColumnWhere($attribute, $value) /** * Get the first column where a given attribute has the given value. * - * @param string $attribute Attribute name on that column definition array. - * @param string $value Value of that attribute on that column definition array. + * @param string $attribute Attribute name on that column definition array. + * @param string $value Value of that attribute on that column definition array. * @return bool */ public function firstColumnWhere($attribute, $value) @@ -357,8 +357,8 @@ public function firstColumnWhere($attribute, $value) * This method checks that all necessary attributes are set. * If not, it tries to guess them. * - * @param string|array $column The column definition array OR column name as string. - * @return array Proper column definition array. + * @param string|array $column The column definition array OR column name as string. + * @return array Proper column definition array. */ public function makeSureColumnHasNeededAttributes($column) { @@ -418,7 +418,7 @@ public function countColumnsWithoutActions() * And if the developer uses the CrudColumn object as Column in his CrudController: * - Column::name('price')->type('number'); * - * @param string $name The name of the column in the db, or model attribute. + * @param string $name The name of the column in the db, or model attribute. * @return CrudColumn */ public function column($name) diff --git a/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php b/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php index 384a8d68d6..c364e139b7 100644 --- a/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php +++ b/src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php @@ -10,7 +10,7 @@ trait ColumnsProtectedMethods /** * Add a column to the current operation, using the Setting API. * - * @param array $column Column definition array. + * @param array $column Column definition array. */ protected function addColumnToOperationSettings($column) { @@ -23,8 +23,8 @@ protected function addColumnToOperationSettings($column) /** * If a column priority has not been defined, provide a default one. * - * @param array $column Column definition array. - * @return array Proper array defining the column. + * @param array $column Column definition array. + * @return array Proper array defining the column. */ protected function makeSureColumnHasPriority($column) { @@ -40,8 +40,8 @@ protected function makeSureColumnHasPriority($column) * If the field definition array is actually a string, it means the programmer was lazy * and has only passed the name of the column. Turn that into a proper array. * - * @param array $column Column definition array. - * @return array Proper array defining the column. + * @param array $column Column definition array. + * @return array Proper array defining the column. */ protected function makeSureColumnHasName($column) { @@ -60,8 +60,8 @@ protected function makeSureColumnHasName($column) * If a column array is missing the "label" attribute, an ugly error would be show. * So we add the field Name as a label - it's better than nothing. * - * @param array $column Column definition array. - * @return array Proper array defining the column. + * @param array $column Column definition array. + * @return array Proper array defining the column. */ protected function makeSureColumnHasLabel($column) { @@ -75,8 +75,8 @@ protected function makeSureColumnHasLabel($column) /** * If a column definition is missing the type, set a default. * - * @param array $column Column definition array. - * @return array Column definition array with type. + * @param array $column Column definition array. + * @return array Column definition array with type. */ protected function makeSureColumnHasType($column) { @@ -102,8 +102,8 @@ protected function makeSureColumnHasType($column) * The key is used when storing all columns using the Settings API, * it is used as the "key" of the associative array that holds all columns. * - * @param array $column Column definition array. - * @return array Column definition array with key. + * @param array $column Column definition array. + * @return array Column definition array with key. */ protected function makeSureColumnHasKey($column) { @@ -120,8 +120,8 @@ protected function makeSureColumnHasKey($column) * By defining this array a developer can wrap the text into an anchor (link), * span, div or whatever they want. * - * @param array $column Column definition array. - * @return array Column definition array with wrapper. + * @param array $column Column definition array. + * @return array Column definition array with wrapper. */ protected function makeSureColumnHasWrapper($column) { @@ -136,8 +136,8 @@ protected function makeSureColumnHasWrapper($column) * If an entity has been defined for the column, but no model, * determine the model from that relationship. * - * @param array $column Column definition array. - * @return array Column definition array with model. + * @param array $column Column definition array. + * @return array Column definition array with model. */ protected function makeSureColumnHasModel($column) { @@ -153,8 +153,8 @@ protected function makeSureColumnHasModel($column) /** * Move the most recently added column before or after the given target column. Default is before. * - * @param string|array $targetColumn The target column name or array. - * @param bool $before If true, the column will be moved before the target column, otherwise it will be moved after it. + * @param string|array $targetColumn The target column name or array. + * @param bool $before If true, the column will be moved before the target column, otherwise it will be moved after it. */ protected function moveColumn($targetColumn, $before = true) { @@ -179,8 +179,8 @@ protected function moveColumn($targetColumn, $before = true) /** * Check if the column exists in the database, as a DB column. * - * @param string $table - * @param string $name + * @param string $table + * @param string $name * * @return bool */ diff --git a/src/app/Library/CrudPanel/Traits/Create.php b/src/app/Library/CrudPanel/Traits/Create.php index aaae9c2bc8..6be6aa7352 100644 --- a/src/app/Library/CrudPanel/Traits/Create.php +++ b/src/app/Library/CrudPanel/Traits/Create.php @@ -17,7 +17,7 @@ trait Create /** * Insert a row in the database. * - * @param array $data All input values to be inserted. + * @param array $data All input values to be inserted. * * @return \Illuminate\Database\Eloquent\Model */ @@ -90,8 +90,8 @@ public function getRelationFieldsWithPivot() /** * Create the relations for the current model. * - * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. - * @param array $data The form data. + * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. + * @param array $data The form data. */ public function createRelations($item, $data) { @@ -102,8 +102,8 @@ public function createRelations($item, $data) /** * Sync the declared many-to-many associations through the pivot field. * - * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. - * @param array $data The form data. + * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. + * @param array $data The form data. */ public function syncPivot($model, $data) { @@ -142,8 +142,8 @@ public function syncPivot($model, $data) /** * Create any existing one to one relations for the current model from the form data. * - * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. - * @param array $data The form data. + * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. + * @param array $data The form data. */ private function createOneToOneRelations($item, $data) { @@ -154,8 +154,8 @@ private function createOneToOneRelations($item, $data) /** * Create any existing one to one relations for the current model from the relation data. * - * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. - * @param array $formattedData The form data. + * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. + * @param array $formattedData The form data. * * @return bool|null */ @@ -208,7 +208,7 @@ private function createRelationsForItem($item, $formattedData) * Those will be nested accordingly in this relation array, so address relation will have a nested relation with country. * * - * @param array $data The form data. + * @param array $data The form data. * * @return array The formatted relation data. */ diff --git a/src/app/Library/CrudPanel/Traits/Delete.php b/src/app/Library/CrudPanel/Traits/Delete.php index f00d16bbb5..16ec7c8406 100644 --- a/src/app/Library/CrudPanel/Traits/Delete.php +++ b/src/app/Library/CrudPanel/Traits/Delete.php @@ -13,7 +13,7 @@ trait Delete /** * Delete a row from the database. * - * @param int $id The id of the item to be deleted. + * @param int $id The id of the item to be deleted. * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException if the model was not found. * diff --git a/src/app/Library/CrudPanel/Traits/FakeFields.php b/src/app/Library/CrudPanel/Traits/FakeFields.php index bdde1e9fea..0eff4510a5 100644 --- a/src/app/Library/CrudPanel/Traits/FakeFields.php +++ b/src/app/Library/CrudPanel/Traits/FakeFields.php @@ -11,9 +11,9 @@ trait FakeFields * The resulting array will only include the fields that are stored in the database and their values, * plus the '_token' and 'redirect_after_save' variables. * - * @param array $requestInput The request input. - * @param string $form The CRUD form. Can be 'create' or 'update' . Default is 'create'. - * @param int|bool $id The CRUD entry id in the case of the 'update' form. + * @param array $requestInput The request input. + * @param string $form The CRUD form. Can be 'create' or 'update' . Default is 'create'. + * @param int|bool $id The CRUD entry id in the case of the 'update' form. * * @see \Illuminate\Http\Request::all() For an example on how to get the request input. * @@ -55,9 +55,9 @@ public function compactFakeFields($requestInput) /** * Compact a fake field in the request input array. * - * @param array $requestInput The request input. - * @param string $fakeFieldName The fake field name. - * @param string $fakeFieldKey The fake field key. + * @param array $requestInput The request input. + * @param string $fakeFieldName The fake field name. + * @param string $fakeFieldKey The fake field key. */ private function addCompactedField(&$requestInput, $fakeFieldName, $fakeFieldKey) { diff --git a/src/app/Library/CrudPanel/Traits/Fields.php b/src/app/Library/CrudPanel/Traits/Fields.php index 62f1e993d1..e8b1fcb185 100644 --- a/src/app/Library/CrudPanel/Traits/Fields.php +++ b/src/app/Library/CrudPanel/Traits/Fields.php @@ -29,8 +29,8 @@ public function fields() * Everything else Backpack can probably guess. This method makes sure the * field definition array is complete, by guessing missing attributes. * - * @param string|array $field The definition of a field (string or array). - * @return array The correct definition of that field. + * @param string|array $field The definition of a field (string or array). + * @return array The correct definition of that field. */ public function makeSureFieldHasNecessaryAttributes($field) { @@ -56,7 +56,7 @@ public function makeSureFieldHasNecessaryAttributes($field) /** * Add a field to the create/update form or both. * - * @param string|array $field The new field. + * @param string|array $field The new field. * * @return self */ @@ -73,7 +73,7 @@ public function addField($field) /** * Add multiple fields to the create/update form or both. * - * @param array $fields The new fields. + * @param array $fields The new fields. */ public function addFields($fields) { @@ -87,7 +87,7 @@ public function addFields($fields) /** * Move the most recently added field after the given target field. * - * @param string $targetFieldName The target field name. + * @param string $targetFieldName The target field name. */ public function afterField($targetFieldName) { @@ -99,7 +99,7 @@ public function afterField($targetFieldName) /** * Move the most recently added field before the given target field. * - * @param string $targetFieldName The target field name. + * @param string $targetFieldName The target field name. */ public function beforeField($targetFieldName) { @@ -126,7 +126,7 @@ public function makeFirstField() /** * Remove a certain field from the create/update/both forms by its name. * - * @param string $name Field name (as defined with the addField() procedure) + * @param string $name Field name (as defined with the addField() procedure) */ public function removeField($name) { @@ -140,7 +140,7 @@ public function removeField($name) /** * Remove many fields from the create/update/both forms by their name. * - * @param array $array_of_names A simple array of the names of the fields to be removed. + * @param array $array_of_names A simple array of the names of the fields to be removed. */ public function removeFields($array_of_names) { @@ -166,8 +166,8 @@ public function removeAllFields() /** * Remove an attribute from one field's definition array. - * @param string $field The name of the field. - * @param string $attribute The name of the attribute being removed. + * @param string $field The name of the field. + * @param string $attribute The name of the attribute being removed. */ public function removeFieldAttribute($field, $attribute) { @@ -181,8 +181,8 @@ public function removeFieldAttribute($field, $attribute) /** * Update value of a given key for a current field. * - * @param string $fieldName The field name - * @param array $modifications An array of changes to be made. + * @param string $fieldName The field name + * @param array $modifications An array of changes to be made. */ public function modifyField($fieldName, $modifications) { @@ -202,8 +202,8 @@ public function modifyField($fieldName, $modifications) /** * Set label for a specific field. * - * @param string $field - * @param string $label + * @param string $field + * @param string $label */ public function setFieldLabel($field, $label) { @@ -214,7 +214,7 @@ public function setFieldLabel($field, $label) * Check if field is the first of its type in the given fields array. * It's used in each field_type.blade.php to determine wether to push the css and js content or not (we only need to push the js and css for a field the first time it's loaded in the form, not any subsequent times). * - * @param array $field The current field being tested if it's the first of its type. + * @param array $field The current field being tested if it's the first of its type. * * @return bool true/false */ @@ -274,7 +274,7 @@ public function getCurrentFields() * Order the CRUD fields. If certain fields are missing from the given order array, they will be * pushed to the new fields array in the original order. * - * @param array $order An array of field names in the desired order. + * @param array $order An array of field names in the desired order. */ public function orderFields($order) { @@ -297,8 +297,8 @@ public function getFields() * Check if the create/update form has upload fields. * Upload fields are the ones that have "upload" => true defined on them. * - * @param string $form create/update/both - defaults to 'both' - * @param bool|int $id id of the entity - defaults to false + * @param string $form create/update/both - defaults to 'both' + * @param bool|int $id id of the entity - defaults to false * * @return bool */ @@ -329,7 +329,7 @@ public function getLoadedFieldTypes() /** * Set an array of field type names as already loaded for the current operation. * - * @param array $fieldTypes + * @param array $fieldTypes */ public function setLoadedFieldTypes($fieldTypes) { @@ -340,7 +340,7 @@ public function setLoadedFieldTypes($fieldTypes) * Get a namespaced version of the field type name. * Appends the 'view_namespace' attribute of the field to the `type', using dot notation. * - * @param mixed $field + * @param mixed $field * @return string Namespaced version of the field type name. Ex: 'text', 'custom.view.path.text' */ public function getFieldTypeWithNamespace($field) @@ -360,8 +360,8 @@ public function getFieldTypeWithNamespace($field) /** * Add a new field type to the loadedFieldTypes array. * - * @param string $field Field array - * @return bool Successful operation true/false. + * @param string $field Field array + * @return bool Successful operation true/false. */ public function addLoadedFieldType($field) { @@ -382,8 +382,8 @@ public function addLoadedFieldType($field) * Alias of the addLoadedFieldType() method. * Adds a new field type to the loadedFieldTypes array. * - * @param string $field Field array - * @return bool Successful operation true/false. + * @param string $field Field array + * @return bool Successful operation true/false. */ public function markFieldTypeAsLoaded($field) { @@ -393,8 +393,8 @@ public function markFieldTypeAsLoaded($field) /** * Check if a field type's reasources (CSS and JS) have already been loaded. * - * @param string $field Field array - * @return bool Whether the field type has been marked as loaded. + * @param string $field Field array + * @return bool Whether the field type has been marked as loaded. */ public function fieldTypeLoaded($field) { @@ -404,8 +404,8 @@ public function fieldTypeLoaded($field) /** * Check if a field type's reasources (CSS and JS) have NOT been loaded. * - * @param string $field Field array - * @return bool Whether the field type has NOT been marked as loaded. + * @param string $field Field array + * @return bool Whether the field type has NOT been marked as loaded. */ public function fieldTypeNotLoaded($field) { @@ -446,8 +446,8 @@ public function getStrippedSaveRequest() /** * Check if a field exists, by any given attribute. * - * @param string $attribute Attribute name on that field definition array. - * @param string $value Value of that attribute on that field definition array. + * @param string $attribute Attribute name on that field definition array. + * @param string $value Value of that attribute on that field definition array. * @return bool */ public function hasFieldWhere($attribute, $value) @@ -462,8 +462,8 @@ public function hasFieldWhere($attribute, $value) /** * Get the first field where a given attribute has the given value. * - * @param string $attribute Attribute name on that field definition array. - * @param string $value Value of that attribute on that field definition array. + * @param string $attribute Attribute name on that field definition array. + * @param string $value Value of that attribute on that field definition array. * @return bool */ public function firstFieldWhere($attribute, $value) @@ -484,7 +484,7 @@ public function firstFieldWhere($attribute, $value) * And if the developer uses the CrudField object as Field in his CrudController: * - Field::name('price')->type('number'); * - * @param string $name The name of the column in the db, or model attribute. + * @param string $name The name of the column in the db, or model attribute. * @return CrudField */ public function field($name) diff --git a/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php b/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php index 9be0bd7fd6..7d5cc02aeb 100644 --- a/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php +++ b/src/app/Library/CrudPanel/Traits/FieldsPrivateMethods.php @@ -7,9 +7,9 @@ trait FieldsPrivateMethods /** * Move the most recently added field before or after the given target field. Default is before. * - * @param array $fields The form fields. - * @param string $targetFieldName The target field name. - * @param bool $before If true, the field will be moved before the target field, otherwise it will be moved after it. + * @param array $fields The form fields. + * @param string $targetFieldName The target field name. + * @param bool $before If true, the field will be moved before the target field, otherwise it will be moved after it. * * @return array */ @@ -37,8 +37,8 @@ private function moveField($fields, $targetFieldName, $before = true) /** * Apply the given order to the fields and return the new array. * - * @param array $fields The fields array. - * @param array $order The desired field order array. + * @param array $fields The fields array. + * @param array $order The desired field order array. * * @return array The ordered fields array. */ @@ -63,7 +63,7 @@ private function applyOrderToFields($fields, $order) /** * Apply the given callback to the form fields. * - * @param callable $callback The callback function to run for the given form fields. + * @param callable $callback The callback function to run for the given form fields. */ private function transformFields(callable $callback) { diff --git a/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php b/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php index fecf297656..2484ca0ac7 100644 --- a/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php +++ b/src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php @@ -10,7 +10,7 @@ trait FieldsProtectedMethods /** * If field has entity we want to get the relation type from it. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasRelationType($field) @@ -23,7 +23,7 @@ public function makeSureFieldHasRelationType($field) /** * If field has entity we want to make sure it also has a model for that relation. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasModel($field) @@ -36,7 +36,7 @@ public function makeSureFieldHasModel($field) /** * Based on relation type we can guess if pivot is set. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasPivot($field) @@ -49,7 +49,7 @@ public function makeSureFieldHasPivot($field) /** * Based on relation type we can try to guess if it is a multiple field. * - * @param array $field + * @param array $field * @return array */ public function makeSureFieldHasMultiple($field) @@ -64,7 +64,7 @@ public function makeSureFieldHasMultiple($field) /** * In case field name is dot notation we want to convert it to a valid HTML array field name for validation purposes. * - * @param array $field + * @param array $field * @return array */ public function overwriteFieldNameFromDotNotationToArray($field) @@ -87,7 +87,7 @@ public function overwriteFieldNameFromDotNotationToArray($field) * If the field_definition_array array is a string, it means the programmer was lazy * and has only passed the name of the field. Turn that into a proper array. * - * @param string|array $field The field definition array (or string). + * @param string|array $field The field definition array (or string). * @return array */ protected function makeSureFieldHasName($field) @@ -208,8 +208,8 @@ protected function makeSureFieldHasAttribute($field) * Set the label of a field, if it's missing, by capitalizing the name and replacing * underscores with spaces. * - * @param array $field Field definition array. - * @return array Field definition array that contains label too. + * @param array $field Field definition array. + * @return array Field definition array that contains label too. */ protected function makeSureFieldHasLabel($field) { @@ -226,8 +226,8 @@ protected function makeSureFieldHasLabel($field) * Set the type of a field, if it's missing, by inferring it from the * db column type. * - * @param array $field Field definition array. - * @return array Field definition array that contains type too. + * @param array $field Field definition array. + * @return array Field definition array that contains type too. */ protected function makeSureFieldHasType($field) { @@ -241,7 +241,7 @@ protected function makeSureFieldHasType($field) /** * Enable the tabs functionality, if a field has a tab defined. * - * @param array $field Field definition array. + * @param array $field Field definition array. * @return void */ protected function enableTabsIfFieldUsesThem($field) @@ -257,7 +257,7 @@ protected function enableTabsIfFieldUsesThem($field) /** * Add a field to the current operation, using the Settings API. * - * @param array $field Field definition array. + * @param array $field Field definition array. */ protected function addFieldToOperationSettings($field) { @@ -277,8 +277,8 @@ protected function addFieldToOperationSettings($field) * - name (if the name is a string) * - name1_name2_name3 (if the name is an array) * - * @param array $field Field definition array. - * @return string The string that should be used as array key. + * @param array $field Field definition array. + * @return string The string that should be used as array key. */ protected function getFieldKey($field) { diff --git a/src/app/Library/CrudPanel/Traits/Filters.php b/src/app/Library/CrudPanel/Traits/Filters.php index a5b5101f23..d481988207 100644 --- a/src/app/Library/CrudPanel/Traits/Filters.php +++ b/src/app/Library/CrudPanel/Traits/Filters.php @@ -44,10 +44,10 @@ public function clearFilters() /** * Add a filter to the CRUD table view. * - * @param array $options Name, type, label, etc. - * @param bool|array|\Closure $values The HTML for the filter. - * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. - * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. + * @param array $options Name, type, label, etc. + * @param bool|array|\Closure $values The HTML for the filter. + * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. + * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. */ public function addFilter($options, $values = false, $filterLogic = false, $fallbackLogic = false) { @@ -61,10 +61,10 @@ public function addFilter($options, $values = false, $filterLogic = false, $fall * Add a filter to the CrudPanel object using the Settings API. * The filter will NOT get applied. * - * @param array $options Name, type, label, etc. - * @param bool|array|\Closure $values The HTML for the filter. - * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. - * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. + * @param array $options Name, type, label, etc. + * @param bool|array|\Closure $values The HTML for the filter. + * @param bool|\Closure $filterLogic Query modification (filtering) logic when filter is active. + * @param bool|\Closure $fallbackLogic Query modification (filtering) logic when filter is not active. */ protected function addFilterToCollection($options, $values = false, $filterLogic = false, $fallbackLogic = false) { @@ -91,7 +91,7 @@ protected function addFilterToCollection($options, $values = false, $filterLogic * Add a filter by specifying the entire CrudFilter object. * The filter logic does NOT get applied. * - * @param CrudFilter $object + * @param CrudFilter $object */ public function addCrudFilter($object) { @@ -101,8 +101,8 @@ public function addCrudFilter($object) /** * Apply the filter. * - * @param CrudFilter $filter - * @param ParameterBag|array|null $input + * @param CrudFilter $filter + * @param ParameterBag|array|null $input */ public function applyFilter(CrudFilter $filter, $input = null) { @@ -135,7 +135,7 @@ public function filters() } /** - * @param string $name + * @param string $name * * @return null|CrudFilter */ @@ -147,7 +147,7 @@ public function getFilter($name) } /** - * @param string $name + * @param string $name * * @return bool */ @@ -161,8 +161,8 @@ public function hasActiveFilter($name) /** * Modify the attributes of a filter. * - * @param string $name The filter name. - * @param array $modifications An array of changes to be made. + * @param string $name The filter name. + * @param array $modifications An array of changes to be made. * * @return CrudFilter The filter that has suffered modifications, for daisychaining methods. */ @@ -213,7 +213,7 @@ public function removeAllFilters() /** * Move the most recently added filter after the given target filter. * - * @param string|array $destination The target filter name or array. + * @param string|array $destination The target filter name or array. */ public function afterFilter($destination) { @@ -225,7 +225,7 @@ public function afterFilter($destination) /** * Move the most recently added filter before the given target filter. * - * @param string|array $destination The target filter name or array. + * @param string|array $destination The target filter name or array. */ public function beforeFilter($destination) { @@ -261,9 +261,9 @@ public function getFilterKey($filterName) /** * Move the most recently added filter before or after the given target filter. Default is before. * - * @param string|array $target The target filter name or array. - * @param string|array $destination The destination filter name or array. - * @param bool $before If true, the filter will be moved before the target filter, otherwise it will be moved after it. + * @param string|array $target The target filter name or array. + * @param string|array $destination The destination filter name or array. + * @param bool $before If true, the filter will be moved before the target filter, otherwise it will be moved after it. */ public function moveFilter($target, $where, $destination) { @@ -297,8 +297,8 @@ public function moveFilter($target, $where, $destination) /** * Check if a filter exists, by any given attribute. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function hasFilterWhere($attribute, $value) @@ -309,8 +309,8 @@ public function hasFilterWhere($attribute, $value) /** * Get the first filter where a given attribute has the given value. * - * @param string $attribute Attribute name on that filter definition array. - * @param string $value Value of that attribute on that filter definition array. + * @param string $attribute Attribute name on that filter definition array. + * @param string $value Value of that attribute on that filter definition array. * @return bool */ public function firstFilterWhere($attribute, $value) @@ -329,7 +329,7 @@ public function firstFilterWhere($attribute, $value) * And if the developer uses the CrudField object as Field in his CrudController: * - Filter::name('price')->type('range')->whenActive(function($value) {}); * - * @param string $name The name of the column in the db, or model attribute. + * @param string $name The name of the column in the db, or model attribute. * @return CrudField */ public function filter($name) diff --git a/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php b/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php index 5fbe6c8a3b..32ed844415 100644 --- a/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php +++ b/src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php @@ -12,7 +12,7 @@ trait HeadingsAndTitles /** * Get the title string for the current controller method (action). * - * @param bool $action create / edit / reorder / etc + * @param bool $action create / edit / reorder / etc * * @return string */ @@ -30,8 +30,8 @@ public function getTitle($action = false) /** * Change the title of a page for a certain controller method (action). * - * @param string $string string to use as title - * @param string $action create / edit / reorder / etc + * @param string $string string to use as title + * @param string $action create / edit / reorder / etc */ public function setTitle($string, $action = false) { @@ -50,7 +50,7 @@ public function setTitle($string, $action = false) /** * Get the heading string for the current controller method (action). * - * @param bool $action create / edit / reorder / etc + * @param bool $action create / edit / reorder / etc * * @return string */ @@ -68,8 +68,8 @@ public function getHeading($action = false) /** * Change the heading of a page for a certain controller method (action). * - * @param string $string string to use as heading - * @param string $action create / edit / reorder / etc + * @param string $string string to use as heading + * @param string $action create / edit / reorder / etc */ public function setHeading($string, $action = false) { @@ -88,7 +88,7 @@ public function setHeading($string, $action = false) /** * Get the subheading for a certain controller method (action). * - * @param bool $action create / edit / reorder / etc + * @param bool $action create / edit / reorder / etc * * @return string */ @@ -106,8 +106,8 @@ public function getSubheading($action = false) /** * Change the subheading of a page for a certain controller method (action). * - * @param string $string string to use as subheading - * @param string $action create / edit / reorder / etc + * @param string $string string to use as subheading + * @param string $action create / edit / reorder / etc */ public function setSubheading($string, $action = false) { diff --git a/src/app/Library/CrudPanel/Traits/Macroable.php b/src/app/Library/CrudPanel/Traits/Macroable.php index acfff7d940..42e5f1ca9d 100644 --- a/src/app/Library/CrudPanel/Traits/Macroable.php +++ b/src/app/Library/CrudPanel/Traits/Macroable.php @@ -14,8 +14,8 @@ trait Macroable * In addition to registering the macro, throw an error if the method already exists on the object * so the developer knows why his macro is not being registered. * - * @param string $name - * @param object|callable $macro + * @param string $name + * @param object|callable $macro * * @return void */ diff --git a/src/app/Library/CrudPanel/Traits/Operations.php b/src/app/Library/CrudPanel/Traits/Operations.php index 402937cbf5..b8fde70238 100644 --- a/src/app/Library/CrudPanel/Traits/Operations.php +++ b/src/app/Library/CrudPanel/Traits/Operations.php @@ -26,7 +26,7 @@ public function getOperation() /** * Set the CRUD operation being performed in string form. * - * @param string $operation_name Ex: create / update / revision / delete + * @param string $operation_name Ex: create / update / revision / delete */ public function setOperation($operation_name) { @@ -46,7 +46,7 @@ public function getCurrentOperation() /** * Set the CRUD operation being performed in string form. * - * @param string $operation_name Ex: create / update / revision / delete + * @param string $operation_name Ex: create / update / revision / delete */ public function setCurrentOperation($operation_name) { @@ -56,8 +56,8 @@ public function setCurrentOperation($operation_name) /** * Convenience method to make sure all calls are made to a particular operation. * - * @param string|array $operation Operation name in string form - * @param bool|\Closure $closure Code that calls CrudPanel methods. + * @param string|array $operation Operation name in string form + * @param bool|\Closure $closure Code that calls CrudPanel methods. * * @return void */ @@ -71,8 +71,8 @@ public function operation($operations, $closure = false) * Allc configurations are put inside that operation's namespace. * Ex: show.configuration. * - * @param string|array $operation Operation name in string form - * @param bool|\Closure $closure Code that calls CrudPanel methods. + * @param string|array $operation Operation name in string form + * @param bool|\Closure $closure Code that calls CrudPanel methods. * * @return void */ @@ -93,7 +93,7 @@ public function configureOperation($operations, $closure = false) * This is called when an operation does setCurrentOperation(). * * - * @param string|array $operations [description] + * @param string|array $operations [description] * * @return void */ diff --git a/src/app/Library/CrudPanel/Traits/Query.php b/src/app/Library/CrudPanel/Traits/Query.php index 91eeb49296..8a7453a1ed 100644 --- a/src/app/Library/CrudPanel/Traits/Query.php +++ b/src/app/Library/CrudPanel/Traits/Query.php @@ -22,7 +22,7 @@ trait Query * $query->activePosts(); * }); * - * @param callable $function + * @param callable $function * * @return mixed */ @@ -34,7 +34,7 @@ public function addClause($function) /** * Use eager loading to reduce the number of queries on the table view. * - * @param array|string $entities + * @param array|string $entities * * @return \Illuminate\Database\Eloquent\Builder */ @@ -46,8 +46,8 @@ public function with($entities) /** * Order the results of the query in a certain way. * - * @param string $field - * @param string $order + * @param string $field + * @param string $order * * @return \Illuminate\Database\Eloquent\Builder */ @@ -63,8 +63,8 @@ public function orderBy($field, $order = 'asc') /** * Order results of the query in a custom way. * - * @param array $column Column array with all attributes - * @param string $column_direction ASC or DESC + * @param array $column Column array with all attributes + * @param string $column_direction ASC or DESC * * @return \Illuminate\Database\Eloquent\Builder */ @@ -88,7 +88,7 @@ public function customOrderBy($column, $columnDirection = 'asc') /** * Group the results of the query in a certain way. * - * @param string $field + * @param string $field * * @return \Illuminate\Database\Eloquent\Builder */ @@ -100,7 +100,7 @@ public function groupBy($field) /** * Limit the number of results in the query. * - * @param int $number + * @param int $number * * @return \Illuminate\Database\Eloquent\Builder */ @@ -112,7 +112,7 @@ public function limit($number) /** * Take a certain number of results from the query. * - * @param int $number + * @param int $number * * @return \Illuminate\Database\Eloquent\Builder */ @@ -124,7 +124,7 @@ public function take($number) /** * Start the result set from a certain number. * - * @param int $number + * @param int $number * * @return \Illuminate\Database\Eloquent\Builder */ diff --git a/src/app/Library/CrudPanel/Traits/Read.php b/src/app/Library/CrudPanel/Traits/Read.php index 192a32d11e..9c9e050caf 100644 --- a/src/app/Library/CrudPanel/Traits/Read.php +++ b/src/app/Library/CrudPanel/Traits/Read.php @@ -229,7 +229,7 @@ public function addCustomPageLengthToPageLengthMenu() /** * Specify array of available page lengths on the list view. * - * @param array|int $menu + * @param array|int $menu * * https://backpackforlaravel.com/docs/4.1/crud-cheat-sheet#page-length */ @@ -263,7 +263,7 @@ public function setPageLengthMenu($menu) * Builds the menu from the given array. It works out with two different types of arrays: * [1, 2, 3] AND [1 => 'one', 2 => 'two', 3 => 'three']. * - * @param array $menu + * @param array $menu * @return array */ private function buildPageLengthMenuFromArray($menu) @@ -309,7 +309,7 @@ public function getPageLengthMenu() /** * Checks if the provided PageLength segment is valid. * - * @param array|int $value + * @param array|int $value * @return void */ private function abortIfInvalidPageLength($value) diff --git a/src/app/Library/CrudPanel/Traits/Relationships.php b/src/app/Library/CrudPanel/Traits/Relationships.php index ef52910e3f..524fe83182 100644 --- a/src/app/Library/CrudPanel/Traits/Relationships.php +++ b/src/app/Library/CrudPanel/Traits/Relationships.php @@ -9,7 +9,7 @@ trait Relationships /** * From the field entity we get the relation instance. * - * @param array $entity + * @param array $entity * @return object */ public function getRelationInstance($field) @@ -47,7 +47,7 @@ public function getRelationInstance($field) /** * Grabs an relation instance and returns the class name of the related model. * - * @param array $field + * @param array $field * @return string */ public function inferFieldModelFromRelationship($field) @@ -60,7 +60,7 @@ public function inferFieldModelFromRelationship($field) /** * Return the relation type from a given field: BelongsTo, HasOne ... etc. * - * @param array $field + * @param array $field * @return string */ public function inferRelationTypeFromRelationship($field) @@ -74,7 +74,7 @@ public function inferRelationTypeFromRelationship($field) * Parse the field name back to the related entity after the form is submited. * Its called in getAllFieldNames(). * - * @param array $fields + * @param array $fields * @return array */ public function parseRelationFieldNamesFromHtml($fields) @@ -99,7 +99,7 @@ public function parseRelationFieldNamesFromHtml($fields) /** * Based on relation type returns the default field type. * - * @param string $relation_type + * @param string $relation_type * @return bool */ public function inferFieldTypeFromFieldRelation($field) @@ -121,7 +121,7 @@ public function inferFieldTypeFromFieldRelation($field) /** * Based on relation type returns if relation allows multiple entities. * - * @param string $relation_type + * @param string $relation_type * @return bool */ public function guessIfFieldHasMultipleFromRelationType($relation_type) @@ -144,7 +144,7 @@ public function guessIfFieldHasMultipleFromRelationType($relation_type) /** * Based on relation type returns if relation has a pivot table. * - * @param string $relation_type + * @param string $relation_type * @return bool */ public function guessIfFieldHasPivotFromRelationType($relation_type) diff --git a/src/app/Library/CrudPanel/Traits/Reorder.php b/src/app/Library/CrudPanel/Traits/Reorder.php index 262c431ac8..a54ede05e5 100644 --- a/src/app/Library/CrudPanel/Traits/Reorder.php +++ b/src/app/Library/CrudPanel/Traits/Reorder.php @@ -10,7 +10,7 @@ trait Reorder /** * Change the order and parents of the given elements, according to the NestedSortable AJAX call. * - * @param array $request The entire request from the NestedSortable AJAX Call. + * @param array $request The entire request from the NestedSortable AJAX Call. * * @return int The number of items whose position in the tree has been changed. */ @@ -41,8 +41,8 @@ public function updateTreeOrder($request) * Enable the Reorder functionality in the CRUD Panel for users that have the been given access to 'reorder' using: * $this->crud->allowAccess('reorder');. * - * @param string $label Column name that will be shown on the labels. - * @param int $max_level Maximum hierarchy level to which the elements can be nested (1 = no nesting, just reordering). + * @param string $label Column name that will be shown on the labels. + * @param int $max_level Maximum hierarchy level to which the elements can be nested (1 = no nesting, just reordering). */ public function enableReorder($label = 'name', $max_level = 1) { diff --git a/src/app/Library/CrudPanel/Traits/SaveActions.php b/src/app/Library/CrudPanel/Traits/SaveActions.php index d609bfeb24..60011afe22 100644 --- a/src/app/Library/CrudPanel/Traits/SaveActions.php +++ b/src/app/Library/CrudPanel/Traits/SaveActions.php @@ -42,7 +42,7 @@ public function getFallBackSaveAction() /** * Gets the save action that has the desired order. * - * @param int $order + * @param int $order * @return array */ public function getSaveActionByOrder($order) @@ -55,7 +55,7 @@ public function getSaveActionByOrder($order) /** * Allow the developer to register multiple save actions. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function addSaveActions($saveActions) @@ -73,7 +73,7 @@ public function addSaveActions($saveActions) /** * Allow developers to register save action into CRUD. * - * @param array $saveAction + * @param array $saveAction * @return void */ public function addSaveAction(array $saveAction) @@ -100,8 +100,8 @@ public function addSaveAction(array $saveAction) /** * Replaces setting order or forces some default. * - * @param string $saveAction - * @param int $wantedOrder + * @param string $saveAction + * @param int $wantedOrder * @return int */ public function orderSaveAction(string $saveAction, int $wantedOrder) @@ -127,7 +127,7 @@ public function orderSaveAction(string $saveAction, int $wantedOrder) /** * Replace the current save actions with the ones provided. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function replaceSaveActions($saveActions) @@ -145,7 +145,7 @@ public function replaceSaveActions($saveActions) /** * Alias function of replaceSaveActions() for CRUD consistency. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function setSaveActions($saveActions) @@ -156,7 +156,7 @@ public function setSaveActions($saveActions) /** * Allow the developer to remove multiple save actions from settings. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function removeSaveActions(array $saveActions) @@ -169,7 +169,7 @@ public function removeSaveActions(array $saveActions) /** * Allow the developer to remove a save action from settings. * - * @param string $saveAction + * @param string $saveAction * @return void */ public function removeSaveAction(string $saveAction) @@ -184,7 +184,7 @@ public function removeSaveAction(string $saveAction) /** * Allow the developer to unset all save actions. * - * @param string $saveAction + * @param string $saveAction * @return void */ public function removeAllSaveActions() @@ -195,7 +195,7 @@ public function removeAllSaveActions() /** * Allows the developer to set save actions order. It could be ['action1','action2'] or ['action1' => 1, 'action2' => 2]. * - * @param array $saveActions + * @param array $saveActions * @return void */ public function orderSaveActions(array $saveActions) @@ -248,7 +248,7 @@ public function getVisibleSaveActions() /** * Gets the current save action for this crud. * - * @param array $saveOptions + * @param array $saveOptions * @return array */ public function getCurrentSaveAction($saveOptions) @@ -298,7 +298,7 @@ public function getSaveAction() /** * Change the session variable that remembers what to do after the "Save" action. * - * @param string|null $forceSaveAction + * @param string|null $forceSaveAction * * @return void */ @@ -322,7 +322,7 @@ public function setSaveAction($forceSaveAction = null) /** * Redirect to the correct URL, depending on which save action has been selected. * - * @param string $itemId + * @param string $itemId * * @return \Illuminate\Http\Response */ diff --git a/src/app/Library/CrudPanel/Traits/Search.php b/src/app/Library/CrudPanel/Traits/Search.php index 1538e1bc56..14e262236b 100644 --- a/src/app/Library/CrudPanel/Traits/Search.php +++ b/src/app/Library/CrudPanel/Traits/Search.php @@ -16,7 +16,7 @@ trait Search /** * Add conditions to the CRUD query for a particular search term. * - * @param string $searchTerm Whatever string the user types in the search bar. + * @param string $searchTerm Whatever string the user types in the search bar. * * @return \Illuminate\Database\Eloquent\Builder */ @@ -101,7 +101,7 @@ public function applySearchLogicForColumn($query, $column, $searchTerm) /** * Tell the list view to NOT show a reponsive DataTable. * - * @param bool $value + * @param bool $value */ public function setResponsiveTable($value = true) { @@ -145,7 +145,7 @@ public function disableResponsiveTable() /** * Tell the list view to NOT store datatable information in local storage. * - * @param bool $value + * @param bool $value */ public function setPersistentTable($value = true) { @@ -199,8 +199,8 @@ public function disablePersistentTable() /** * Get the HTML of the cells in a table row, for a certain DB entry. * - * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; - * @param bool|int $rowNumber The number shown to the user as row number (index); + * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; + * @param bool|int $rowNumber The number shown to the user as row number (index); * * @return array Array of HTML cell contents. */ @@ -237,9 +237,9 @@ public function getRowViews($entry, $rowNumber = false) /** * Get the HTML of a cell, using the column types. * - * @param array $column - * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; - * @param bool|int $rowNumber The number shown to the user as row number (index); + * @param array $column + * @param \Illuminate\Database\Eloquent\Model $entry A db entry of the current entity; + * @param bool|int $rowNumber The number shown to the user as row number (index); * * @return string */ @@ -251,7 +251,7 @@ public function getCellView($column, $entry, $rowNumber = false) /** * Get the name of the view to load for the cell. * - * @param array $column + * @param array $column * * @return string */ @@ -279,10 +279,10 @@ private function getCellViewName($column) /** * Render the given view. * - * @param string $view - * @param array $column - * @param object $entry - * @param bool|int $rowNumber The number shown to the user as row number (index) + * @param string $view + * @param array $column + * @param object $entry + * @param bool|int $rowNumber The number shown to the user as row number (index) * * @return string */ @@ -303,10 +303,10 @@ private function renderCellView($view, $column, $entry, $rowNumber = false) /** * Created the array to be fed to the data table. * - * @param array $entries Eloquent results. - * @param int $totalRows - * @param int $filteredRows - * @param bool|int $startIndex + * @param array $entries Eloquent results. + * @param int $totalRows + * @param int $filteredRows + * @param bool|int $startIndex * * @return array */ @@ -329,8 +329,8 @@ public function getEntriesAsJsonForDatatables($entries, $totalRows, $filteredRow /** * Return the column attribute (column in database) prefixed with table to use in search. * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param string $column + * @param \Illuminate\Database\Eloquent\Builder $query + * @param string $column * @return string */ public function getColumnWithTableNamePrefixed($query, $column) diff --git a/src/app/Library/CrudPanel/Traits/Settings.php b/src/app/Library/CrudPanel/Traits/Settings.php index 97d373e03e..50a718691b 100644 --- a/src/app/Library/CrudPanel/Traits/Settings.php +++ b/src/app/Library/CrudPanel/Traits/Settings.php @@ -14,7 +14,7 @@ trait Settings /** * Getter for the settings key-value store. * - * @param string $key Usually operation.name (ex: list.exportButtons) + * @param string $key Usually operation.name (ex: list.exportButtons) * * @return mixed [description] */ @@ -26,8 +26,8 @@ public function get(string $key) /** * Setter for the settings key-value store. * - * @param string $key Usually operation.name (ex: reorder.max_level) - * @param bool $value True/false depending on success. + * @param string $key Usually operation.name (ex: reorder.max_level) + * @param bool $value True/false depending on success. */ public function set(string $key, $value) { @@ -37,7 +37,7 @@ public function set(string $key, $value) /** * Check if the settings key is used (has a value). * - * @param string $key Usually operation.name (ex: reorder.max_level) + * @param string $key Usually operation.name (ex: reorder.max_level) * * @return bool */ @@ -65,8 +65,8 @@ public function settings() /** * Getter and setter for the settings key-value store. * - * @param string $key Usually operation.name (ex: list.exportButtons) - * @param mixed $value The value you want to store. + * @param string $key Usually operation.name (ex: list.exportButtons) + * @param mixed $value The value you want to store. * * @return mixed Setting value for setter. True/false for getter. */ @@ -82,8 +82,8 @@ public function setting(string $key, $value = null) /** * Convenience method for getting or setting a key on the current operation. * - * @param string $key Has no operation prepended. (ex: exportButtons) - * @param mixed $value The value you want to store. + * @param string $key Has no operation prepended. (ex: exportButtons) + * @param mixed $value The value you want to store. * * @return mixed Setting value for setter. True/false for getter. */ @@ -98,7 +98,7 @@ public function operationSetting(string $key, $value = null, $operation = null) * Getter for the settings key-value store on a certain operation. * Defaults to the current operation. * - * @param string $key Has no operation prepended. (ex: exportButtons) + * @param string $key Has no operation prepended. (ex: exportButtons) * * @return mixed [description] */ @@ -113,7 +113,7 @@ public function getOperationSetting(string $key, $operation = null) * Check if the settings key is used (has a value). * Defaults to the current operation. * - * @param string $key Has no operation prepended. (ex: exportButtons) + * @param string $key Has no operation prepended. (ex: exportButtons) * * @return mixed [description] */ @@ -128,8 +128,8 @@ public function hasOperationSetting(string $key, $operation = null) * Setter for the settings key-value store for a certain operation. * Defaults to the current operation. * - * @param string $key Has no operation prepended. (ex: max_level) - * @param bool $value True/false depending on success. + * @param string $key Has no operation prepended. (ex: max_level) + * @param bool $value True/false depending on success. */ public function setOperationSetting(string $key, $value, $operation = null) { @@ -142,7 +142,7 @@ public function setOperationSetting(string $key, $value, $operation = null) * Automatically set values in config file (config/backpack/crud) * as settings values for that operation. * - * @param string $configPath Config string that leads to where the configs are stored. + * @param string $configPath Config string that leads to where the configs are stored. */ public function loadDefaultOperationSettingsFromConfig($configPath = null) { diff --git a/src/app/Library/CrudPanel/Traits/Tabs.php b/src/app/Library/CrudPanel/Traits/Tabs.php index 529eb383e1..a3813baac9 100644 --- a/src/app/Library/CrudPanel/Traits/Tabs.php +++ b/src/app/Library/CrudPanel/Traits/Tabs.php @@ -72,7 +72,7 @@ public function disableHorizontalTabs() } /** - * @param string $label + * @param string $label * * @return bool */ diff --git a/src/app/Library/CrudPanel/Traits/Update.php b/src/app/Library/CrudPanel/Traits/Update.php index 3f909d7594..57e28c5362 100644 --- a/src/app/Library/CrudPanel/Traits/Update.php +++ b/src/app/Library/CrudPanel/Traits/Update.php @@ -15,8 +15,8 @@ trait Update /** * Update a row in the database. * - * @param int $id The entity's id - * @param array $data All inputs to be updated. + * @param int $id The entity's id + * @param array $data All inputs to be updated. * * @return object */ @@ -41,7 +41,7 @@ public function update($id, $data) /** * Get all fields needed for the EDIT ENTRY form. * - * @param int $id The id of the entry that is being edited. + * @param int $id The id of the entry that is being edited. * * @return array The fields with attributes, fake attributes and values. */ @@ -79,8 +79,8 @@ public function getUpdateFields($id = false) /** * Get the value of the 'name' attribute from the declared relation model in the given field. * - * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. - * @param array $field The CRUD field array. + * @param \Illuminate\Database\Eloquent\Model $model The current CRUD model. + * @param array $field The CRUD field array. * * @return mixed The value of the 'name' attribute from the relation model. */ diff --git a/src/app/Library/CrudPanel/Traits/Validation.php b/src/app/Library/CrudPanel/Traits/Validation.php index 5582969c08..b45bcd33ac 100644 --- a/src/app/Library/CrudPanel/Traits/Validation.php +++ b/src/app/Library/CrudPanel/Traits/Validation.php @@ -10,7 +10,7 @@ trait Validation * Mark a FormRequest file as required for the current operation, in Settings. * Adds the required rules to an array for easy access. * - * @param string $class Class that extends FormRequest + * @param string $class Class that extends FormRequest */ public function setValidation($class) { @@ -37,7 +37,7 @@ public function disableValidation() /** * Mark a FormRequest file as required for the current operation, in Settings. * - * @param string $class Class that extends FormRequest + * @param string $class Class that extends FormRequest */ public function setFormRequest($class) { @@ -80,7 +80,7 @@ public function validateRequest() * Parse a FormRequest class, figure out what inputs are required * and store this knowledge in the current object. * - * @param string $class Class that extends FormRequest + * @param string $class Class that extends FormRequest */ public function setRequiredFields($class) { @@ -106,8 +106,8 @@ public function setRequiredFields($class) * Check the current object to see if an input is required * for the given operation. * - * @param string $inputKey Field or input name. - * @param string $operation create / update + * @param string $inputKey Field or input name. + * @param string $operation create / update * * @return bool */ diff --git a/src/app/Library/CrudPanel/Traits/Views.php b/src/app/Library/CrudPanel/Traits/Views.php index 53497855d6..6fce61dc54 100644 --- a/src/app/Library/CrudPanel/Traits/Views.php +++ b/src/app/Library/CrudPanel/Traits/Views.php @@ -11,7 +11,7 @@ trait Views /** * Sets the create template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -33,7 +33,7 @@ public function getCreateView() /** * Sets the create content class. * - * @param string $class content class + * @param string $class content class */ public function setCreateContentClass(string $class) { @@ -57,7 +57,7 @@ public function getCreateContentClass() /** * Sets the list template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -79,7 +79,7 @@ public function getListView() /** * Sets the list content class. * - * @param string $class content class + * @param string $class content class */ public function setListContentClass(string $class) { @@ -99,7 +99,7 @@ public function getListContentClass() /** * Sets the details row template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -121,7 +121,7 @@ public function getDetailsRowView() /** * Sets the show template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -143,7 +143,7 @@ public function getShowView() /** * Sets the edit content class. * - * @param string $class content class + * @param string $class content class */ public function setShowContentClass(string $class) { @@ -167,7 +167,7 @@ public function getShowContentClass() /** * Sets the edit template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -189,7 +189,7 @@ public function getEditView() /** * Sets the edit content class. * - * @param string $class content class + * @param string $class content class */ public function setEditContentClass(string $class) { @@ -209,7 +209,7 @@ public function getEditContentClass() /** * Sets the reorder template. * - * @param string $view name of the template file + * @param string $view name of the template file * * @return string $view name of the template file */ @@ -231,7 +231,7 @@ public function getReorderView() /** * Sets the reorder content class. * - * @param string $class content class + * @param string $class content class */ public function setReorderContentClass(string $class) { diff --git a/src/app/Library/Widget.php b/src/app/Library/Widget.php index 42a8e51a45..6fc48732a2 100644 --- a/src/app/Library/Widget.php +++ b/src/app/Library/Widget.php @@ -23,7 +23,7 @@ public function __construct($attributes) * If a widget with the same name exists, it will update the attributes of that one * instead of creating a new one. * - * @param string|array $attributes Either the name of the widget, or an array with the attributes the new widget should hold, including the name attribute. + * @param string|array $attributes Either the name of the widget, or an array with the attributes the new widget should hold, including the name attribute. * * @return Widget */ @@ -71,7 +71,7 @@ public static function make($attributes = null) /** * Remove an attribute from the current definition array. * - * @param string $attribute Name of the attribute to forget (ex: class) + * @param string $attribute Name of the attribute to forget (ex: class) * @return Widget */ public function forget($attribute) @@ -247,8 +247,8 @@ public function dd() * * Eg: class('something') will set the "class" attribute to "something" * - * @param string $method The method being called that doesn't exist. - * @param array $parameters The arguments when that method was called. + * @param string $method The method being called that doesn't exist. + * @param array $parameters The arguments when that method was called. * * @return Widget */ diff --git a/src/app/Models/Traits/HasFakeFields.php b/src/app/Models/Traits/HasFakeFields.php index bd1c24689c..43e05abae4 100644 --- a/src/app/Models/Traits/HasFakeFields.php +++ b/src/app/Models/Traits/HasFakeFields.php @@ -15,7 +15,7 @@ trait HasFakeFields /** * Add fake fields as regular attributes, even though they are stored as JSON. * - * @param array $columns - the database columns that contain the JSONs + * @param array $columns - the database columns that contain the JSONs */ public function addFakes($columns = ['extras']) { @@ -41,7 +41,7 @@ public function addFakes($columns = ['extras']) /** * Return the entity with fake fields as attributes. * - * @param array $columns - the database columns that contain the JSONs + * @param array $columns - the database columns that contain the JSONs * * @return Model */ diff --git a/src/app/Models/Traits/HasRelationshipFields.php b/src/app/Models/Traits/HasRelationshipFields.php index 4c202db4de..731b8330b5 100644 --- a/src/app/Models/Traits/HasRelationshipFields.php +++ b/src/app/Models/Traits/HasRelationshipFields.php @@ -46,8 +46,8 @@ public function getTableWithPrefix() /** * Get the column type for a certain db column. * - * @param string $columnName Name of the column in the db table. - * @return string Db column type. + * @param string $columnName Name of the column in the db table. + * @return string Db column type. */ public function getColumnType($columnName) { @@ -60,7 +60,7 @@ public function getColumnType($columnName) /** * Checks if the given column name is nullable. * - * @param string $column_name The name of the db column. + * @param string $column_name The name of the db column. * @return bool */ public static function isColumnNullable($column_name) diff --git a/src/app/Models/Traits/HasUploadFields.php b/src/app/Models/Traits/HasUploadFields.php index 5f4cd06429..1a9ce516ad 100644 --- a/src/app/Models/Traits/HasUploadFields.php +++ b/src/app/Models/Traits/HasUploadFields.php @@ -23,10 +23,10 @@ trait HasUploadFields * - if the value is null, deletes the file and sets null in the DB * - if the value is different, stores the different file and updates DB value. * - * @param string $value Value for that column sent from the input. - * @param string $attribute_name Model attribute name (and column in the db). - * @param string $disk Filesystem disk used to store files. - * @param string $destination_path Path in disk where to store the files. + * @param string $value Value for that column sent from the input. + * @param string $attribute_name Model attribute name (and column in the db). + * @param string $disk Filesystem disk used to store files. + * @param string $destination_path Path in disk where to store the files. */ public function uploadFileToDisk($value, $attribute_name, $disk, $destination_path) { @@ -68,10 +68,10 @@ public function uploadFileToDisk($value, $attribute_name, $disk, $destination_pa * - deletes the file * - removes that file from the DB. * - * @param string $value Value for that column sent from the input. - * @param string $attribute_name Model attribute name (and column in the db). - * @param string $disk Filesystem disk used to store files. - * @param string $destination_path Path in disk where to store the files. + * @param string $value Value for that column sent from the input. + * @param string $attribute_name Model attribute name (and column in the db). + * @param string $disk Filesystem disk used to store files. + * @param string $destination_path Path in disk where to store the files. */ public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path) { diff --git a/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php b/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php index c11ea88958..690a56f5eb 100644 --- a/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php +++ b/src/app/Models/Traits/SpatieTranslatable/HasTranslations.php @@ -23,7 +23,7 @@ trait HasTranslations /** * Use the forced locale if present. * - * @param string $key + * @param string $key * * @return mixed */ @@ -67,7 +67,7 @@ public function getTranslation(string $key, string $locale, bool $useFallbackLoc /** * Create translated items as json. * - * @param array $attributes + * @param array $attributes * * @return static */ @@ -95,8 +95,8 @@ public static function create(array $attributes = []) /** * Update translated items as json. * - * @param array $attributes - * @param array $options + * @param array $attributes + * @param array $options * * @return bool */ @@ -177,8 +177,8 @@ public function getLocale() /** * Magic method to get the db entries already translated in the wanted locale. * - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * * @return */ diff --git a/src/app/Models/Traits/SpatieTranslatable/SlugService.php b/src/app/Models/Traits/SpatieTranslatable/SlugService.php index f5152e5228..8ec1a5de93 100644 --- a/src/app/Models/Traits/SpatieTranslatable/SlugService.php +++ b/src/app/Models/Traits/SpatieTranslatable/SlugService.php @@ -9,8 +9,8 @@ class SlugService extends \Cviebrock\EloquentSluggable\Services\SlugService /** * Slug the current model. * - * @param \Illuminate\Database\Eloquent\Model $model - * @param bool $force + * @param \Illuminate\Database\Eloquent\Model $model + * @param bool $force * * @return bool */ @@ -43,9 +43,9 @@ public function slug(Model $model, bool $force = false): bool /** * Checks if the slug should be unique, and makes it so if needed. * - * @param string $slug - * @param array $config - * @param string $attribute + * @param string $slug + * @param array $config + * @param string $attribute * * @return string */ diff --git a/src/app/Models/Traits/SpatieTranslatable/Sluggable.php b/src/app/Models/Traits/SpatieTranslatable/Sluggable.php index f74f324d5a..1454f31204 100644 --- a/src/app/Models/Traits/SpatieTranslatable/Sluggable.php +++ b/src/app/Models/Traits/SpatieTranslatable/Sluggable.php @@ -22,7 +22,7 @@ public static function bootSluggable() /** * Clone the model into a new, non-existing instance. * - * @param array|null $except + * @param array|null $except * * @return Model */ @@ -37,11 +37,11 @@ public function replicate(array $except = null): Model /** * Query scope for finding "similar" slugs, used to determine uniqueness. * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $attribute - * @param array $config - * @param string $slug + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $attribute + * @param array $config + * @param string $slug * * @return \Illuminate\Database\Eloquent\Builder */ diff --git a/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php b/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php index d011f55881..16dddd1412 100644 --- a/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php +++ b/src/app/Models/Traits/SpatieTranslatable/SluggableObserver.php @@ -20,8 +20,8 @@ class SluggableObserver extends \Cviebrock\EloquentSluggable\SluggableObserver /** * SluggableObserver constructor. * - * @param \Cviebrock\EloquentSluggable\Services\SlugService $slugService - * @param \Illuminate\Contracts\Events\Dispatcher $events + * @param \Cviebrock\EloquentSluggable\Services\SlugService $slugService + * @param \Illuminate\Contracts\Events\Dispatcher $events */ public function __construct(SlugService $slugService, Dispatcher $events) { @@ -30,7 +30,7 @@ public function __construct(SlugService $slugService, Dispatcher $events) } /** - * @param \Illuminate\Database\Eloquent\Model $model + * @param \Illuminate\Database\Eloquent\Model $model * * @return bool|null */ @@ -40,8 +40,8 @@ public function saving(Model $model) } /** - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $event + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $event * * @return bool|null */ @@ -59,8 +59,8 @@ protected function generateSlug(Model $model, string $event) /** * Fire the namespaced validating event. * - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $event + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $event * * @return mixed */ @@ -72,8 +72,8 @@ protected function fireSluggingEvent(Model $model, string $event) /** * Fire the namespaced post-validation event. * - * @param \Illuminate\Database\Eloquent\Model $model - * @param string $status + * @param \Illuminate\Database\Eloquent\Model $model + * @param string $status * * @return void */ diff --git a/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php b/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php index 6dffedc094..8dcd5b0922 100644 --- a/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php +++ b/src/app/Models/Traits/SpatieTranslatable/SluggableScopeHelpers.php @@ -12,8 +12,8 @@ trait SluggableScopeHelpers /** * Query scope for finding a model by its primary slug. * - * @param \Illuminate\Database\Eloquent\Builder $scope - * @param string $slug + * @param \Illuminate\Database\Eloquent\Builder $scope + * @param string $slug * * @return \Illuminate\Database\Eloquent\Builder */ @@ -25,8 +25,8 @@ public function scopeWhereSlug(Builder $scope, string $slug): Builder /** * Find a model by its primary slug. * - * @param string $slug - * @param array $columns + * @param string $slug + * @param array $columns * * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null */ @@ -38,8 +38,8 @@ public static function findBySlug(string $slug, array $columns = ['*']) /** * Find a model by its primary slug or throw an exception. * - * @param string $slug - * @param array $columns + * @param string $slug + * @param array $columns * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * diff --git a/src/helpers.php b/src/helpers.php index 4e677f9c13..a35deb4b85 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -176,8 +176,8 @@ function backpack_user() * Capitalize the first letter of a string, * even if that string is multi-byte (non-latin alphabet). * - * @param string $string String to have its first letter capitalized. - * @param encoding $encoding Character encoding + * @param string $string String to have its first letter capitalized. + * @param encoding $encoding Character encoding * * @return string String with first letter capitalized. */ diff --git a/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php b/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php index 89d4c0d8da..1d02b10ad3 100644 --- a/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php +++ b/tests/Unit/CrudPanel/BaseDBCrudPanelTest.php @@ -39,7 +39,7 @@ protected function setUp(): void /** * Define environment setup. * - * @param \Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * * @return void */ @@ -51,8 +51,8 @@ protected function getEnvironmentSetUp($app) /** * Assert that the attributes of a model entry are equal to the expected array of attributes. * - * @param array $expected attributes - * @param \Illuminate\Database\Eloquent\Model $actual model + * @param array $expected attributes + * @param \Illuminate\Database\Eloquent\Model $actual model */ protected function assertEntryEquals($expected, $actual) { From 47a40a36b8d0dcbff1d43687ad9a3ba88acb950b Mon Sep 17 00:00:00 2001 From: Antonio Almeida Date: Mon, 21 Nov 2022 10:25:39 +0000 Subject: [PATCH 6/6] Removed possible and unnecessary breaking change --- src/resources/views/crud/columns/inc/wrapper_end.blade.php | 1 - src/resources/views/crud/columns/inc/wrapper_start.blade.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/resources/views/crud/columns/inc/wrapper_end.blade.php b/src/resources/views/crud/columns/inc/wrapper_end.blade.php index 890d62ad28..9c097bf98b 100644 --- a/src/resources/views/crud/columns/inc/wrapper_end.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_end.blade.php @@ -12,5 +12,4 @@ @if($column['wrapper']['suffix'] ?? false) {{ $column['wrapper']['suffix'] }} @endif - diff --git a/src/resources/views/crud/columns/inc/wrapper_start.blade.php b/src/resources/views/crud/columns/inc/wrapper_start.blade.php index 3fa3b81695..12bfdb0f03 100644 --- a/src/resources/views/crud/columns/inc/wrapper_start.blade.php +++ b/src/resources/views/crud/columns/inc/wrapper_start.blade.php @@ -14,7 +14,6 @@ {{$element}}="{{$value}}" @endforeach > - @if($column['wrapper']['prefix'] ?? false) {{ $column['wrapper']['prefix'] }} @endif \ No newline at end of file