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 @@ 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,8 +54,8 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getEntry($id) |
56 | 56 | { |
57 | - if (! $this->entry) { |
|
58 | - $this->entry = $this->model->where($this->model->getRouteKeyName(),$id)->firstOrFail(); |
|
57 | + if (!$this->entry) { |
|
58 | + $this->entry = $this->model->where($this->model->getRouteKeyName(), $id)->firstOrFail(); |
|
59 | 59 | $this->entry = $this->entry->withFakes(); |
60 | 60 | } |
61 | 61 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | // we will apply the same labels as the values to the menu if developer didn't |
243 | 243 | $this->abortIfInvalidPageLength($menu[0]); |
244 | 244 | |
245 | - if (! isset($menu[1]) || ! is_array($menu[1])) { |
|
245 | + if (!isset($menu[1]) || !is_array($menu[1])) { |
|
246 | 246 | $menu[1] = $menu[0]; |
247 | 247 | } |
248 | 248 | } else { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function delete($id) |
25 | 25 | { |
26 | - return (string) $this->model->where($this->model->getRouteKeyName(),$id)->firstOrFail()->delete(); |
|
26 | + return (string) $this->model->where($this->model->getRouteKeyName(), $id)->firstOrFail()->delete(); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | $data = $this->decodeJsonCastedAttributes($data); |
26 | 26 | $data = $this->compactFakeFields($data); |
27 | - $item = $this->model->where($this->model->getRouteKeyName(),$id)->firstOrFail(); |
|
27 | + $item = $this->model->where($this->model->getRouteKeyName(), $id)->firstOrFail(); |
|
28 | 28 | |
29 | 29 | $this->createRelations($item, $data); |
30 | 30 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | foreach ($fields as &$field) { |
54 | 54 | // set the value |
55 | - if (! isset($field['value'])) { |
|
55 | + if (!isset($field['value'])) { |
|
56 | 56 | if (isset($field['subfields'])) { |
57 | 57 | $field['value'] = []; |
58 | 58 | foreach ($field['subfields'] as $subfield) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | // always have a hidden input for the entry id |
68 | - if (! array_key_exists('id', $fields)) { |
|
68 | + if (!array_key_exists('id', $fields)) { |
|
69 | 69 | $fields['id'] = [ |
70 | 70 | 'name' => $entry->getKeyName(), |
71 | 71 | 'value' => $entry->getKey(), |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $relation_array = explode('.', $relational_entity); |
93 | 93 | |
94 | - $relatedModel = $relatedModel = array_reduce(array_splice($relation_array, 0, -1), function ($obj, $method) { |
|
94 | + $relatedModel = $relatedModel = array_reduce(array_splice($relation_array, 0, -1), function($obj, $method) { |
|
95 | 95 | return $obj->{$method} ? $obj->{$method} : $obj; |
96 | 96 | }, $model); |
97 | 97 |
@@ -8,10 +8,10 @@ |
||
8 | 8 | * Generates a UUID on model creation accoriding to the public $uuidColumn parameter |
9 | 9 | */ |
10 | 10 | |
11 | -trait CanGenerateUuid{ |
|
11 | +trait CanGenerateUuid { |
|
12 | 12 | protected static function bootCanGenerateUuid() |
13 | 13 | { |
14 | - static::creating(function ($model) { |
|
14 | + static::creating(function($model) { |
|
15 | 15 | if ($model->uuidColumn != null) { |
16 | 16 | $model->{$model->uuidColumn} = (string) Str::uuid(); |
17 | 17 | } |
@@ -9,19 +9,19 @@ |
||
9 | 9 | trait CanChangeRouteKey{ |
10 | 10 | |
11 | 11 | |
12 | - /** |
|
13 | - * Get the route key for the model. |
|
14 | - * |
|
15 | - * @return string |
|
16 | - */ |
|
17 | - public function getRouteKeyName() |
|
18 | - { |
|
19 | - return $this->routeKey ?? parent::getRouteKeyName(); |
|
20 | - } |
|
12 | + /** |
|
13 | + * Get the route key for the model. |
|
14 | + * |
|
15 | + * @return string |
|
16 | + */ |
|
17 | + public function getRouteKeyName() |
|
18 | + { |
|
19 | + return $this->routeKey ?? parent::getRouteKeyName(); |
|
20 | + } |
|
21 | 21 | |
22 | 22 | |
23 | - public function getKey() |
|
24 | - { |
|
25 | - return $this->routeKey ? $this->{$this->getRouteKeyName()} : parent::getKey(); |
|
26 | - } |
|
23 | + public function getKey() |
|
24 | + { |
|
25 | + return $this->routeKey ? $this->{$this->getRouteKeyName()} : parent::getKey(); |
|
26 | + } |
|
27 | 27 | } |
28 | 28 | \ No newline at end of file |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * public $routeKey = 'uuid'; |
7 | 7 | */ |
8 | 8 | |
9 | -trait CanChangeRouteKey{ |
|
9 | +trait CanChangeRouteKey { |
|
10 | 10 | |
11 | 11 | |
12 | 12 | /** |