We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 | { |
@@ -113,7 +113,7 @@ |
||
113 | 113 | * |
114 | 114 | * @param string $key Has no operation prepended. (ex: exportButtons) |
115 | 115 | * |
116 | - * @return mixed [description] |
|
116 | + * @return boolean [description] |
|
117 | 117 | */ |
118 | 118 | public function hasOperationSetting(string $key, $operation = null) |
119 | 119 | { |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function settings() |
57 | 57 | { |
58 | - return array_sort($this->settings, function ($value, $key) { |
|
58 | + return array_sort($this->settings, function($value, $key) { |
|
59 | 59 | return $key; |
60 | 60 | }); |
61 | 61 | } |
@@ -22,36 +22,36 @@ |
||
22 | 22 | } |
23 | 23 | } |
24 | 24 | |
25 | - //for update form, get initial state of the entity |
|
26 | - if (isset($id) && $id) { |
|
25 | + //for update form, get initial state of the entity |
|
26 | + if (isset($id) && $id) { |
|
27 | 27 | |
28 | 28 | //get entity with relations for primary dependency |
29 | - $entity_dependencies = $entity_model->with($primary_dependency['entity']) |
|
30 | - ->with($primary_dependency['entity'].'.'.$primary_dependency['entity_secondary']) |
|
31 | - ->find($id); |
|
29 | + $entity_dependencies = $entity_model->with($primary_dependency['entity']) |
|
30 | + ->with($primary_dependency['entity'].'.'.$primary_dependency['entity_secondary']) |
|
31 | + ->find($id); |
|
32 | 32 | |
33 | - $secondaries_from_primary = []; |
|
33 | + $secondaries_from_primary = []; |
|
34 | 34 | |
35 | - //convert relation in array |
|
36 | - $primary_array = $entity_dependencies->{$primary_dependency['entity']}->toArray(); |
|
35 | + //convert relation in array |
|
36 | + $primary_array = $entity_dependencies->{$primary_dependency['entity']}->toArray(); |
|
37 | 37 | |
38 | - $secondary_ids = []; |
|
38 | + $secondary_ids = []; |
|
39 | 39 | |
40 | - //create secondary dependency from primary relation, used to check what chekbox must be check from second checklist |
|
41 | - if (old($primary_dependency['name'])) { |
|
42 | - foreach (old($primary_dependency['name']) as $primary_item) { |
|
43 | - foreach ($dependencyArray[$primary_item] as $second_item) { |
|
44 | - $secondary_ids[$second_item] = $second_item; |
|
45 | - } |
|
46 | - } |
|
47 | - } else { //create dependecies from relation if not from validate error |
|
48 | - foreach ($primary_array as $primary_item) { |
|
49 | - foreach ($primary_item[$secondary_dependency['entity']] as $second_item) { |
|
50 | - $secondary_ids[$second_item['id']] = $second_item['id']; |
|
51 | - } |
|
52 | - } |
|
53 | - } |
|
54 | - } |
|
40 | + //create secondary dependency from primary relation, used to check what chekbox must be check from second checklist |
|
41 | + if (old($primary_dependency['name'])) { |
|
42 | + foreach (old($primary_dependency['name']) as $primary_item) { |
|
43 | + foreach ($dependencyArray[$primary_item] as $second_item) { |
|
44 | + $secondary_ids[$second_item] = $second_item; |
|
45 | + } |
|
46 | + } |
|
47 | + } else { //create dependecies from relation if not from validate error |
|
48 | + foreach ($primary_array as $primary_item) { |
|
49 | + foreach ($primary_item[$secondary_dependency['entity']] as $second_item) { |
|
50 | + $secondary_ids[$second_item['id']] = $second_item['id']; |
|
51 | + } |
|
52 | + } |
|
53 | + } |
|
54 | + } |
|
55 | 55 | |
56 | 56 | //json encode of dependency matrix |
57 | 57 | $dependencyJson = json_encode($dependencyArray); |