We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -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 |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Http\Requests; |
4 | 4 | |
5 | -use Illuminate\Validation\Rule; |
|
6 | 5 | use Illuminate\Foundation\Http\FormRequest; |
6 | +use Illuminate\Validation\Rule; |
|
7 | 7 | |
8 | 8 | class AccountInfoRequest extends FormRequest |
9 | 9 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Http\Requests; |
4 | 4 | |
5 | -use Illuminate\Support\Facades\Hash; |
|
6 | 5 | use Illuminate\Foundation\Http\FormRequest; |
6 | +use Illuminate\Support\Facades\Hash; |
|
7 | 7 | |
8 | 8 | class ChangePasswordRequest extends FormRequest |
9 | 9 | { |
@@ -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 | }); |
@@ -2,33 +2,33 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Library\CrudPanel; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Collection; |
|
6 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Read; |
|
7 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Tabs; |
|
8 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Query; |
|
9 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Views; |
|
10 | 5 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Access; |
6 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\AutoFocus; |
|
7 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\AutoSet; |
|
8 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Buttons; |
|
9 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Columns; |
|
11 | 10 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Create; |
12 | 11 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Delete; |
13 | 12 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Errors; |
13 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\FakeColumns; |
|
14 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\FakeFields; |
|
14 | 15 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Fields; |
15 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Search; |
|
16 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Update; |
|
17 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\AutoSet; |
|
18 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Buttons; |
|
19 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Columns; |
|
20 | 16 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Filters; |
21 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Reorder; |
|
22 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Settings; |
|
23 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\AutoFocus; |
|
17 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\HeadingsAndTitles; |
|
24 | 18 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Macroable; |
25 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\FakeFields; |
|
26 | 19 | use Backpack\CRUD\app\Library\CrudPanel\Traits\Operations; |
27 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\Validation; |
|
28 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\FakeColumns; |
|
20 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Query; |
|
21 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Read; |
|
22 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Reorder; |
|
29 | 23 | use Backpack\CRUD\app\Library\CrudPanel\Traits\SaveActions; |
30 | -use Backpack\CRUD\app\Library\CrudPanel\Traits\HeadingsAndTitles; |
|
24 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Search; |
|
25 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Settings; |
|
26 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Tabs; |
|
27 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Update; |
|
28 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Validation; |
|
29 | +use Backpack\CRUD\app\Library\CrudPanel\Traits\Views; |
|
31 | 30 | use Backpack\CRUD\app\Library\CrudPanel\Traits\ViewsAndRestoresRevisions; |
31 | +use Illuminate\Database\Eloquent\Collection; |
|
32 | 32 | |
33 | 33 | class CrudPanel |
34 | 34 | { |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function setModel($model_namespace) |
78 | 78 | { |
79 | - if (! class_exists($model_namespace)) { |
|
79 | + if (!class_exists($model_namespace)) { |
|
80 | 80 | throw new \Exception('The model does not exist.', 500); |
81 | 81 | } |
82 | 82 | |
83 | - if (! method_exists($model_namespace, 'hasCrudTrait')) { |
|
83 | + if (!method_exists($model_namespace, 'hasCrudTrait')) { |
|
84 | 84 | throw new \Exception('Please use CrudTrait on the model.', 500); |
85 | 85 | } |
86 | 86 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | { |
144 | 144 | $complete_route = $route.'.index'; |
145 | 145 | |
146 | - if (! \Route::has($complete_route)) { |
|
146 | + if (!\Route::has($complete_route)) { |
|
147 | 147 | throw new \Exception('There are no routes for this route name.', 404); |
148 | 148 | } |
149 | 149 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | public function getFirstOfItsTypeInArray($type, $array) |
246 | 246 | { |
247 | - return array_first($array, function ($item) use ($type) { |
|
247 | + return array_first($array, function($item) use ($type) { |
|
248 | 248 | return $item['type'] == $type; |
249 | 249 | }); |
250 | 250 | } |
@@ -261,8 +261,8 @@ discard block |
||
261 | 261 | |
262 | 262 | public function sync($type, $fields, $attributes) |
263 | 263 | { |
264 | - if (! empty($this->{$type})) { |
|
265 | - $this->{$type} = array_map(function ($field) use ($fields, $attributes) { |
|
264 | + if (!empty($this->{$type})) { |
|
265 | + $this->{$type} = array_map(function($field) use ($fields, $attributes) { |
|
266 | 266 | if (in_array($field['name'], (array) $fields)) { |
267 | 267 | $field = array_merge($field, $attributes); |
268 | 268 | } |
@@ -294,15 +294,15 @@ discard block |
||
294 | 294 | { |
295 | 295 | $relationArray = explode('.', $relationString); |
296 | 296 | |
297 | - if (! isset($length)) { |
|
297 | + if (!isset($length)) { |
|
298 | 298 | $length = count($relationArray); |
299 | 299 | } |
300 | 300 | |
301 | - if (! isset($model)) { |
|
301 | + if (!isset($model)) { |
|
302 | 302 | $model = $this->model; |
303 | 303 | } |
304 | 304 | |
305 | - $result = array_reduce(array_splice($relationArray, 0, $length), function ($obj, $method) { |
|
305 | + $result = array_reduce(array_splice($relationArray, 0, $length), function($obj, $method) { |
|
306 | 306 | return $obj->$method()->getRelated(); |
307 | 307 | }, $model); |
308 | 308 | |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | $relation = $model->{$firstRelationName}; |
353 | 353 | |
354 | 354 | $results = []; |
355 | - if (! empty($relation)) { |
|
355 | + if (!empty($relation)) { |
|
356 | 356 | if ($relation instanceof Collection) { |
357 | 357 | $currentResults = $relation->toArray(); |
358 | 358 | } else { |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | array_shift($relationArray); |
363 | 363 | |
364 | - if (! empty($relationArray)) { |
|
364 | + if (!empty($relationArray)) { |
|
365 | 365 | foreach ($currentResults as $currentResult) { |
366 | 366 | $results = array_merge($results, $this->getRelationModelInstances($currentResult, implode('.', $relationArray))); |
367 | 367 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Check if any operations are allowed for a Crud Panel. Return false if not. |
52 | 52 | * |
53 | - * @param array $operation_array |
|
53 | + * @param boolean $operation_array |
|
54 | 54 | * @return bool |
55 | 55 | */ |
56 | 56 | public function hasAccessToAny($operation_array) |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | /** |
68 | 68 | * Check if all operations are allowed for a Crud Panel. Return false if not. |
69 | 69 | * |
70 | - * @param array $operation_array Permissions. |
|
70 | + * @param string $operation_array Permissions. |
|
71 | 71 | * @return bool |
72 | 72 | */ |
73 | 73 | public function hasAccessToAll($operation_array) |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->set($op.'.access', false); |
34 | 34 | } |
35 | 35 | |
36 | - return ! $this->hasAccessToAny($operation); |
|
36 | + return !$this->hasAccessToAny($operation); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function hasAccessToAll($operation_array) |
74 | 74 | { |
75 | 75 | foreach ((array) $operation_array as $key => $operation) { |
76 | - if (! $this->get($operation.'.access')) { |
|
76 | + if (!$this->get($operation.'.access')) { |
|
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function hasAccessOrFail($operation) |
92 | 92 | { |
93 | - if (! $this->get($operation.'.access')) { |
|
93 | + if (!$this->get($operation.'.access')) { |
|
94 | 94 | throw new AccessDeniedException(trans('backpack::crud.unauthorized_access', ['access' => $operation])); |
95 | 95 | } |
96 | 96 |
@@ -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); |
@@ -95,6 +95,12 @@ |
||
95 | 95 | public $type = 'view'; |
96 | 96 | public $content; |
97 | 97 | |
98 | + /** |
|
99 | + * @param string $stack |
|
100 | + * @param string $name |
|
101 | + * @param string $type |
|
102 | + * @param string $content |
|
103 | + */ |
|
98 | 104 | public function __construct($stack, $name, $type, $content) |
99 | 105 | { |
100 | 106 | $this->stack = $stack; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | $button = $this->buttons()->firstWhere('name', $name); |
94 | 94 | |
95 | - if (! $button) { |
|
95 | + if (!$button) { |
|
96 | 96 | abort(500, 'CRUD Button "'.$name.'" not found. Please check the button exists before you modify it.'); |
97 | 97 | } |
98 | 98 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function removeButton($name, $stack = null) |
115 | 115 | { |
116 | - $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($name, $stack) { |
|
116 | + $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($name, $stack) { |
|
117 | 117 | return $stack == null ? $button->name == $name : ($button->stack == $stack) && ($button->name == $name); |
118 | 118 | })); |
119 | 119 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function removeButtons($names, $stack = null) |
126 | 126 | { |
127 | - if (! empty($names)) { |
|
127 | + if (!empty($names)) { |
|
128 | 128 | foreach ($names as $name) { |
129 | 129 | $this->removeButton($name, $stack); |
130 | 130 | } |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | |
139 | 139 | public function removeAllButtonsFromStack($stack) |
140 | 140 | { |
141 | - $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($stack) { |
|
141 | + $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($stack) { |
|
142 | 142 | return $button->stack == $stack; |
143 | 143 | })); |
144 | 144 | } |
145 | 145 | |
146 | 146 | public function removeButtonFromStack($name, $stack) |
147 | 147 | { |
148 | - $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($name, $stack) { |
|
148 | + $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($name, $stack) { |
|
149 | 149 | return $button->name == $name && $button->stack == $stack; |
150 | 150 | })); |
151 | 151 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | /** |
162 | 162 | * Move this column to be first in the columns list. |
163 | - * @return bool|null |
|
163 | + * @return false|null |
|
164 | 164 | */ |
165 | 165 | public function makeFirstColumn() |
166 | 166 | { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | /** |
238 | 238 | * Remove a column from the CRUD panel by name. |
239 | 239 | * |
240 | - * @param string $column The column key. |
|
240 | + * @param string $columnKey The column key. |
|
241 | 241 | */ |
242 | 242 | public function removeColumn($columnKey) |
243 | 243 | { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function addColumn($column) |
64 | 64 | { |
65 | 65 | // if a string was passed, not an array, change it to an array |
66 | - if (! is_array($column)) { |
|
66 | + if (!is_array($column)) { |
|
67 | 67 | $column = ['name' => $column]; |
68 | 68 | } |
69 | 69 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $column_with_details = $this->addDefaultLabel($column); |
72 | 72 | |
73 | 73 | // make sure the column has a name |
74 | - if (! array_key_exists('name', $column_with_details)) { |
|
74 | + if (!array_key_exists('name', $column_with_details)) { |
|
75 | 75 | $column_with_details['name'] = 'anonymous_column_'.str_random(5); |
76 | 76 | } |
77 | 77 | |
@@ -79,27 +79,27 @@ discard block |
||
79 | 79 | $columnExistsInDb = $this->hasColumn($this->model->getTable(), $column_with_details['name']); |
80 | 80 | |
81 | 81 | // make sure the column has a type |
82 | - if (! array_key_exists('type', $column_with_details)) { |
|
82 | + if (!array_key_exists('type', $column_with_details)) { |
|
83 | 83 | $column_with_details['type'] = 'text'; |
84 | 84 | } |
85 | 85 | |
86 | 86 | // make sure the column has a key |
87 | - if (! array_key_exists('key', $column_with_details)) { |
|
87 | + if (!array_key_exists('key', $column_with_details)) { |
|
88 | 88 | $column_with_details['key'] = $column_with_details['name']; |
89 | 89 | } |
90 | 90 | |
91 | 91 | // make sure the column has a tableColumn boolean |
92 | - if (! array_key_exists('tableColumn', $column_with_details)) { |
|
92 | + if (!array_key_exists('tableColumn', $column_with_details)) { |
|
93 | 93 | $column_with_details['tableColumn'] = $columnExistsInDb ? true : false; |
94 | 94 | } |
95 | 95 | |
96 | 96 | // make sure the column has a orderable boolean |
97 | - if (! array_key_exists('orderable', $column_with_details)) { |
|
97 | + if (!array_key_exists('orderable', $column_with_details)) { |
|
98 | 98 | $column_with_details['orderable'] = $columnExistsInDb ? true : false; |
99 | 99 | } |
100 | 100 | |
101 | 101 | // make sure the column has a searchLogic |
102 | - if (! array_key_exists('searchLogic', $column_with_details)) { |
|
102 | + if (!array_key_exists('searchLogic', $column_with_details)) { |
|
103 | 103 | $column_with_details['searchLogic'] = $columnExistsInDb ? true : false; |
104 | 104 | } |
105 | 105 | |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | |
109 | 109 | // make sure the column has a priority in terms of visibility |
110 | 110 | // if no priority has been defined, use the order in the array plus one |
111 | - if (! array_key_exists('priority', $column_with_details)) { |
|
111 | + if (!array_key_exists('priority', $column_with_details)) { |
|
112 | 112 | $position_in_columns_array = (int) array_search($column_with_details['key'], array_keys($this->columns())); |
113 | 113 | $columnsArray[$column_with_details['key']]['priority'] = $position_in_columns_array + 1; |
114 | 114 | } |
115 | 115 | |
116 | 116 | // if this is a relation type field and no corresponding model was specified, get it from the relation method |
117 | 117 | // defined in the main model |
118 | - if (isset($column_with_details['entity']) && ! isset($column_with_details['model'])) { |
|
118 | + if (isset($column_with_details['entity']) && !isset($column_with_details['model'])) { |
|
119 | 119 | $columnsArray[$column_with_details['key']]['model'] = $this->getRelationModel($column_with_details['entity']); |
120 | 120 | } |
121 | 121 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function makeFirstColumn() |
166 | 166 | { |
167 | - if (! $this->columns()) { |
|
167 | + if (!$this->columns()) { |
|
168 | 168 | return false; |
169 | 169 | } |
170 | 170 | |
@@ -186,8 +186,7 @@ discard block |
||
186 | 186 | $columnsArray = $this->columns(); |
187 | 187 | |
188 | 188 | if (array_key_exists($targetColumnName, $columnsArray)) { |
189 | - $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : |
|
190 | - array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
189 | + $targetColumnPosition = $before ? array_search($targetColumnName, array_keys($columnsArray)) : array_search($targetColumnName, array_keys($columnsArray)) + 1; |
|
191 | 190 | |
192 | 191 | $element = array_pop($columnsArray); |
193 | 192 | $beginningPart = array_slice($columnsArray, 0, $targetColumnPosition, true); |
@@ -225,7 +224,7 @@ discard block |
||
225 | 224 | */ |
226 | 225 | public function addDefaultLabel($array) |
227 | 226 | { |
228 | - if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) { |
|
227 | + if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) { |
|
229 | 228 | $array = array_merge(['label' => mb_ucfirst($this->makeLabel($array['name']))], $array); |
230 | 229 | |
231 | 230 | return $array; |
@@ -253,7 +252,7 @@ discard block |
||
253 | 252 | */ |
254 | 253 | public function removeColumns($columns) |
255 | 254 | { |
256 | - if (! empty($columns)) { |
|
255 | + if (!empty($columns)) { |
|
257 | 256 | foreach ($columns as $columnKey) { |
258 | 257 | $this->removeColumn($columnKey); |
259 | 258 | } |
@@ -331,7 +330,7 @@ discard block |
||
331 | 330 | { |
332 | 331 | $columns = $this->columns(); |
333 | 332 | |
334 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
333 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
335 | 334 | return $value == null; |
336 | 335 | })->toArray(); |
337 | 336 | } |
@@ -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 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Backpack\CRUD\app\Library\CrudPanel\Traits; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Relations\HasOne; |
|
6 | 5 | use Illuminate\Database\Eloquent\Relations\BelongsTo; |
6 | +use Illuminate\Database\Eloquent\Relations\HasOne; |
|
7 | 7 | |
8 | 8 | trait Create |
9 | 9 | { |
@@ -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 |