We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -41,9 +41,9 @@ |
||
41 | 41 | */ |
42 | 42 | public function withValidator($validator) |
43 | 43 | { |
44 | - $validator->after(function ($validator) { |
|
44 | + $validator->after(function($validator) { |
|
45 | 45 | // check old password matches |
46 | - if (! Hash::check($this->input('old_password'), backpack_auth()->user()->password)) { |
|
46 | + if (!Hash::check($this->input('old_password'), backpack_auth()->user()->password)) { |
|
47 | 47 | $validator->errors()->add('old_password', trans('backpack::base.old_password_incorrect')); |
48 | 48 | } |
49 | 49 | }); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | ], |
44 | 44 | |
45 | 45 | // CSS files that are loaded in all pages, using Laravel's mix() helper |
46 | - 'mix_styles' => [ // file_path => manifest_directory_path |
|
46 | + 'mix_styles' => [// file_path => manifest_directory_path |
|
47 | 47 | // 'css/app.css' => '', |
48 | 48 | ], |
49 | 49 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | private function sendUsageStats() |
39 | 39 | { |
40 | 40 | // only send usage stats in production |
41 | - if (! $this->runningInProduction()) { |
|
41 | + if (!$this->runningInProduction()) { |
|
42 | 42 | return; |
43 | 43 | } |
44 | 44 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * Check if the application is running in normal conditions |
9 | 9 | * (production env, not in console, not in unit tests). |
10 | 10 | * |
11 | - * @return void |
|
11 | + * @return boolean |
|
12 | 12 | */ |
13 | 13 | private function runningInProduction() |
14 | 14 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @param string $url URL to point the request at. |
86 | 86 | * @param array $payload The data you want sent to the URL. |
87 | 87 | * |
88 | - * @return void |
|
88 | + * @return boolean |
|
89 | 89 | */ |
90 | 90 | private function makeCurlRequest($method, $url, $payload) |
91 | 91 | { |
@@ -175,6 +175,7 @@ |
||
175 | 175 | |
176 | 176 | /** |
177 | 177 | * Set the number of rows that should be show on the list view. |
178 | + * @param integer $value |
|
178 | 179 | */ |
179 | 180 | public function setDefaultPageLength($value) |
180 | 181 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | $id = $this->getCurrentEntryId(); |
40 | 40 | |
41 | - if (! $id) { |
|
41 | + if (!$id) { |
|
42 | 42 | return false; |
43 | 43 | } |
44 | 44 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getEntry($id) |
56 | 56 | { |
57 | - if (! $this->entry) { |
|
57 | + if (!$this->entry) { |
|
58 | 58 | $this->entry = $this->model->findOrFail($id); |
59 | 59 | $this->entry = $this->entry->withFakes(); |
60 | 60 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | // If the default Page Length isn't in the menu's values, Add it the beginnin and resort all to show a croissant list. |
205 | 205 | // assume both arrays are the same length. |
206 | - if (! in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) { |
|
206 | + if (!in_array($this->getDefaultPageLength(), $this->getOperationSetting('pageLengthMenu')[0])) { |
|
207 | 207 | // Loop through 2 arrays of prop. pageLengthMenu |
208 | 208 | foreach ($this->getOperationSetting('pageLengthMenu') as $key => &$page_length_choices) { |
209 | 209 | // This is a condition that should be always true. |
@@ -301,6 +301,9 @@ discard block |
||
301 | 301 | return $this->getShowView(); |
302 | 302 | } |
303 | 303 | |
304 | + /** |
|
305 | + * @param string $view |
|
306 | + */ |
|
304 | 307 | public function setPreviewView($view) |
305 | 308 | { |
306 | 309 | return $this->setShowView($view); |
@@ -311,6 +314,9 @@ discard block |
||
311 | 314 | return $this->getEditView(); |
312 | 315 | } |
313 | 316 | |
317 | + /** |
|
318 | + * @param string $view |
|
319 | + */ |
|
314 | 320 | public function setUpdateView($view) |
315 | 321 | { |
316 | 322 | return $this->setEditView($view); |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | public function register() |
55 | 55 | { |
56 | 56 | // Bind the CrudPanel object to Laravel's service container |
57 | - $this->app->singleton('crud', function ($app) { |
|
57 | + $this->app->singleton('crud', function($app) { |
|
58 | 58 | return new \Backpack\CRUD\app\Library\CrudPanel\CrudPanel($app); |
59 | 59 | }); |
60 | 60 | |
61 | 61 | // load a macro for Route, |
62 | 62 | // helps developers load all routes for a CRUD resource in one line |
63 | - if (! Route::hasMacro('crud')) { |
|
63 | + if (!Route::hasMacro('crud')) { |
|
64 | 64 | $this->addRouteMacro(); |
65 | 65 | } |
66 | 66 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | // } |
82 | 82 | |
83 | 83 | // map the elfinder prefix |
84 | - if (! \Config::get('elfinder.route.prefix')) { |
|
84 | + if (!\Config::get('elfinder.route.prefix')) { |
|
85 | 85 | \Config::set('elfinder.route.prefix', \Config::get('backpack.base.route_prefix').'/elfinder'); |
86 | 86 | } |
87 | 87 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $middleware_key = config('backpack.base.middleware_key'); |
92 | 92 | $middleware_class = config('backpack.base.middleware_class'); |
93 | 93 | |
94 | - if (! is_array($middleware_class)) { |
|
94 | + if (!is_array($middleware_class)) { |
|
95 | 95 | $router->pushMiddlewareToGroup($middleware_key, $middleware_class); |
96 | 96 | |
97 | 97 | return; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | private function addRouteMacro() |
197 | 197 | { |
198 | - Route::macro('crud', function ($name, $controller) { |
|
198 | + Route::macro('crud', function($name, $controller) { |
|
199 | 199 | // put together the route name prefix, |
200 | 200 | // as passed to the Route::group() statements |
201 | 201 | $routeName = ''; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | return; |
18 | 18 | } |
19 | 19 | |
20 | - if (! $this->validCode(config('backpack.base.license_code'))) { |
|
20 | + if (!$this->validCode(config('backpack.base.license_code'))) { |
|
21 | 21 | \Alert::add('warning', "<strong>You're using unlicensed software.</strong> Please ask your web developer to <a target='_blank' class='alert-link text-white' href='http://backpackforlaravel.com'>purchase a license code</a> to hide this message."); |
22 | 22 | } |
23 | 23 | } |
@@ -9,7 +9,6 @@ |
||
9 | 9 | /** |
10 | 10 | * Define which routes are needed for this operation. |
11 | 11 | * |
12 | - * @param string $name Name of the current entity (singular). Used as first URL segment. |
|
13 | 12 | * @param string $routeName Prefix of the route name. |
14 | 13 | * @param string $controller Name of the current CrudController. |
15 | 14 | */ |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | $this->crud->set('reorder.enabled', true); |
37 | 37 | $this->crud->allowAccess('reorder'); |
38 | 38 | |
39 | - $this->crud->operation('reorder', function () { |
|
39 | + $this->crud->operation('reorder', function() { |
|
40 | 40 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
41 | 41 | }); |
42 | 42 | |
43 | - $this->crud->operation('list', function () { |
|
43 | + $this->crud->operation('list', function() { |
|
44 | 44 | $this->crud->addButton('top', 'reorder', 'view', 'crud::buttons.reorder'); |
45 | 45 | }); |
46 | 46 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $this->crud->hasAccessOrFail('reorder'); |
58 | 58 | |
59 | - if (! $this->crud->isReorderEnabled()) { |
|
59 | + if (!$this->crud->isReorderEnabled()) { |
|
60 | 60 | abort(403, 'Reorder is disabled.'); |
61 | 61 | } |
62 | 62 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * |
20 | 20 | * TODO: should this delete items with relations to it too? |
21 | 21 | * |
22 | - * @return bool True if the item was deleted. |
|
22 | + * @return string True if the item was deleted. |
|
23 | 23 | */ |
24 | 24 | public function delete($id) |
25 | 25 | { |