We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -247,7 +247,7 @@ |
||
247 | 247 | |
248 | 248 | private function getButtonByName($name) |
249 | 249 | { |
250 | - return $this->crudPanel->buttons()->first(function ($value) use ($name) { |
|
250 | + return $this->crudPanel->buttons()->first(function($value) use ($name) { |
|
251 | 251 | return $value->name == $name; |
252 | 252 | }); |
253 | 253 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * Execute the console command. |
35 | 35 | * |
36 | - * @return bool|null |
|
36 | + * @return false|null |
|
37 | 37 | */ |
38 | 38 | public function handle() |
39 | 39 | { |
@@ -71,9 +71,8 @@ discard block |
||
71 | 71 | * Replace the User model, if it was moved to App\Models\User. |
72 | 72 | * |
73 | 73 | * @param string $stub |
74 | - * @param string $name |
|
75 | 74 | * |
76 | - * @return $this |
|
75 | + * @return string |
|
77 | 76 | */ |
78 | 77 | protected function makeReplacements(&$stub) |
79 | 78 | { |
@@ -67,7 +67,7 @@ |
||
67 | 67 | * |
68 | 68 | * @param \Illuminate\Http\Request $request |
69 | 69 | * |
70 | - * @return \Illuminate\Http\Response |
|
70 | + * @return \Illuminate\Http\RedirectResponse |
|
71 | 71 | */ |
72 | 72 | public function logout(Request $request) |
73 | 73 | { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param array $data |
68 | 68 | * |
69 | - * @return User |
|
69 | + * @return \Illuminate\Contracts\Auth\Authenticatable |
|
70 | 70 | */ |
71 | 71 | protected function create(array $data) |
72 | 72 | { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * |
103 | 103 | * @param \Illuminate\Http\Request $request |
104 | 104 | * |
105 | - * @return \Illuminate\Http\Response |
|
105 | + * @return \Illuminate\Http\RedirectResponse |
|
106 | 106 | */ |
107 | 107 | public function register(Request $request) |
108 | 108 | { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | public function showRegistrationForm() |
89 | 89 | { |
90 | 90 | // if registration is closed, deny access |
91 | - if (! config('backpack.base.registration_open')) { |
|
91 | + if (!config('backpack.base.registration_open')) { |
|
92 | 92 | abort(403, trans('backpack::base.registration_closed')); |
93 | 93 | } |
94 | 94 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public function register(Request $request) |
108 | 108 | { |
109 | 109 | // if registration is closed, deny access |
110 | - if (! config('backpack.base.registration_open')) { |
|
110 | + if (!config('backpack.base.registration_open')) { |
|
111 | 111 | abort(403, trans('backpack::base.registration_closed')); |
112 | 112 | } |
113 | 113 |
@@ -27,7 +27,6 @@ |
||
27 | 27 | /** |
28 | 28 | * Get the path the user should be redirected to after password reset. |
29 | 29 | * |
30 | - * @param \Illuminate\Http\Request $request |
|
31 | 30 | * |
32 | 31 | * @return string |
33 | 32 | */ |
@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | $this->middleware("guest:$guard"); |
49 | 49 | |
50 | - if (! backpack_users_have_email()) { |
|
50 | + if (!backpack_users_have_email()) { |
|
51 | 51 | abort(501, trans('backpack::base.no_email_column')); |
52 | 52 | } |
53 | 53 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * Answer to unauthorized access request. |
31 | 31 | * |
32 | - * @param [type] $request [description] |
|
32 | + * @param \Illuminate\Http\Request $request [description] |
|
33 | 33 | * |
34 | 34 | * @return [type] [description] |
35 | 35 | */ |
@@ -56,7 +56,7 @@ |
||
56 | 56 | return $this->respondToUnauthorizedRequest($request); |
57 | 57 | } |
58 | 58 | |
59 | - if (! $this->checkIfUserIsAdmin(backpack_user())) { |
|
59 | + if (!$this->checkIfUserIsAdmin(backpack_user())) { |
|
60 | 60 | return $this->respondToUnauthorizedRequest($request); |
61 | 61 | } |
62 | 62 |
@@ -12,6 +12,9 @@ |
||
12 | 12 | return $this->getOperationSetting('autoFocusOnFirstField'); |
13 | 13 | } |
14 | 14 | |
15 | + /** |
|
16 | + * @param boolean $value |
|
17 | + */ |
|
15 | 18 | public function setAutoFocusOnFirstField($value) |
16 | 19 | { |
17 | 20 | return $this->setOperationSetting('autoFocusOnFirstField', (bool) $value); |
@@ -159,7 +159,7 @@ |
||
159 | 159 | * @param \Illuminate\Database\Eloquent\Model $item The current CRUD model. |
160 | 160 | * @param array $formattedData The form data. |
161 | 161 | * |
162 | - * @return bool|null |
|
162 | + * @return false|null |
|
163 | 163 | */ |
164 | 164 | private function createRelationsForItem($item, $formattedData) |
165 | 165 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | $all_relation_fields = $this->getRelationFields(); |
83 | 83 | |
84 | - return array_where($all_relation_fields, function ($value, $key) { |
|
84 | + return array_where($all_relation_fields, function($value, $key) { |
|
85 | 85 | return isset($value['pivot']) && $value['pivot']; |
86 | 86 | }); |
87 | 87 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | private function createRelationsForItem($item, $formattedData) |
158 | 158 | { |
159 | - if (! isset($formattedData['relations'])) { |
|
159 | + if (!isset($formattedData['relations'])) { |
|
160 | 160 | return false; |
161 | 161 | } |
162 | 162 | |
@@ -213,11 +213,11 @@ discard block |
||
213 | 213 | $key = implode('.relations.', explode('.', $relationField['entity'])); |
214 | 214 | $fieldData = array_get($relationData, 'relations.'.$key, []); |
215 | 215 | |
216 | - if (! array_key_exists('model', $fieldData)) { |
|
216 | + if (!array_key_exists('model', $fieldData)) { |
|
217 | 217 | $fieldData['model'] = $relationField['model']; |
218 | 218 | } |
219 | 219 | |
220 | - if (! array_key_exists('parent', $fieldData)) { |
|
220 | + if (!array_key_exists('parent', $fieldData)) { |
|
221 | 221 | $fieldData['parent'] = $this->getRelationModel($relationField['entity'], -1); |
222 | 222 | } |
223 | 223 |
@@ -10,8 +10,6 @@ |
||
10 | 10 | * plus the '_token' and 'redirect_after_save' variables. |
11 | 11 | * |
12 | 12 | * @param array $requestInput The request input. |
13 | - * @param string $form The CRUD form. Can be 'create' or 'update' . Default is 'create'. |
|
14 | - * @param int|bool $id The CRUD entry id in the case of the 'update' form. |
|
15 | 13 | * |
16 | 14 | * @see \Illuminate\Http\Request::all() For an example on how to get the request input. |
17 | 15 | * |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $fakeFieldKey = isset($field['store_in']) ? $field['store_in'] : 'extras'; |
33 | 33 | $this->addCompactedField($requestInput, $fieldName, $fakeFieldKey); |
34 | 34 | |
35 | - if (! in_array($fakeFieldKey, $compactedFakeFields)) { |
|
35 | + if (!in_array($fakeFieldKey, $compactedFakeFields)) { |
|
36 | 36 | $compactedFakeFields[] = $fakeFieldKey; |
37 | 37 | } |
38 | 38 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // json_encode all fake_value columns if applicable in the database, so they can be properly stored and interpreted |
43 | 43 | foreach ($compactedFakeFields as $value) { |
44 | - if (! (property_exists($this->model, 'translatable') && in_array($value, $this->model->getTranslatableAttributes(), true)) && $this->model->shouldEncodeFake($value)) { |
|
44 | + if (!(property_exists($this->model, 'translatable') && in_array($value, $this->model->getTranslatableAttributes(), true)) && $this->model->shouldEncodeFake($value)) { |
|
45 | 45 | $requestInput[$value] = json_encode($requestInput[$value]); |
46 | 46 | } |
47 | 47 | } |