We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -18,15 +18,15 @@ discard block |
||
18 | 18 | |
19 | 19 | $entry = CrudPanelFacade::getCurrentEntry(); |
20 | 20 | |
21 | - if (! array_key_exists($attribute, $this->data) && $entry) { |
|
22 | - if(str_contains($attribute, '.') && get_class($entry) === get_class(CrudPanelFacade::getModel())) { |
|
21 | + if (!array_key_exists($attribute, $this->data) && $entry) { |
|
22 | + if (str_contains($attribute, '.') && get_class($entry) === get_class(CrudPanelFacade::getModel())) { |
|
23 | 23 | $previousValue = Arr::get($this->data, '_order_'.Str::before($attribute, '.')); |
24 | 24 | $previousValue = Arr::get($previousValue, Str::after($attribute, '.')); |
25 | - }else{ |
|
26 | - $previousValue = Arr::get($entry,$attribute); |
|
25 | + } else { |
|
26 | + $previousValue = Arr::get($entry, $attribute); |
|
27 | 27 | } |
28 | 28 | |
29 | - if($previousValue && empty($value)) { |
|
29 | + if ($previousValue && empty($value)) { |
|
30 | 30 | return []; |
31 | 31 | } |
32 | 32 | Arr::set($this->data, $attribute, $previousValue ?? $value); |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | |
35 | 35 | $fieldErrors = $this->validateFieldRules($attribute, $value); |
36 | 36 | |
37 | - if (! empty($value) && ! empty($this->getFileRules())) { |
|
37 | + if (!empty($value) && !empty($this->getFileRules())) { |
|
38 | 38 | $fileErrors = $this->validateFileRules($attribute, $value); |
39 | 39 | } |
40 | 40 | |
41 | 41 | return array_merge($fieldErrors, $fileErrors ?? []); |
42 | 42 | } |
43 | 43 | |
44 | - public static function field(string|array|ValidationRule|Rule $rules = []): self |
|
44 | + public static function field(string | array | ValidationRule | Rule $rules = []): self |
|
45 | 45 | { |
46 | 46 | return parent::field($rules); |
47 | 47 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | if(str_contains($attribute, '.') && get_class($entry) === get_class(CrudPanelFacade::getModel())) { |
23 | 23 | $previousValue = Arr::get($this->data, '_order_'.Str::before($attribute, '.')); |
24 | 24 | $previousValue = Arr::get($previousValue, Str::after($attribute, '.')); |
25 | - }else{ |
|
25 | + } else{ |
|
26 | 26 | $previousValue = Arr::get($entry,$attribute); |
27 | 27 | } |
28 | 28 |