@@ -18,7 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * Get the view / contents that represent the component. |
20 | 20 | */ |
21 | - public function render(): View|Closure|string |
|
21 | + public function render(): View | Closure | string |
|
22 | 22 | { |
23 | 23 | return view('components.theme-toggle'); |
24 | 24 | } |
@@ -35,13 +35,13 @@ |
||
35 | 35 | |
36 | 36 | // Cast the value the same as the old value to not change the type |
37 | 37 | if (is_bool($setting->value)) { |
38 | - $value = (bool)$value; |
|
38 | + $value = (bool) $value; |
|
39 | 39 | } elseif (is_int($setting->value)) { |
40 | - $value = (int)$value; |
|
40 | + $value = (int) $value; |
|
41 | 41 | } elseif (is_float($setting->value)) { |
42 | - $value = (float)$value; |
|
42 | + $value = (float) $value; |
|
43 | 43 | } else { |
44 | - $value = (string)$value; |
|
44 | + $value = (string) $value; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Assign the new value dans save it. |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | class Settings |
13 | 13 | { |
14 | - protected null|array $context = [ |
|
14 | + protected null | array $context = [ |
|
15 | 15 | 'model_type' => null, |
16 | 16 | 'model_id' => null |
17 | 17 | ]; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @return $this |
74 | 74 | */ |
75 | - public function setContext(Model|array|null $context = null): self |
|
75 | + public function setContext(Model | array | null $context = null): self |
|
76 | 76 | { |
77 | 77 | if ($context instanceof Model) { |
78 | 78 | $this->context['model_type'] = get_class($context); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | /** |
38 | 38 | * Get the view / contents that represent the component. |
39 | 39 | */ |
40 | - public function render(): View|Closure|string |
|
40 | + public function render(): View | Closure | string |
|
41 | 41 | { |
42 | 42 | return view('components.textarea'); |
43 | 43 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | /** |
72 | 72 | * Get the view / contents that represent the component. |
73 | 73 | */ |
74 | - public function render(): View|Closure|string |
|
74 | + public function render(): View | Closure | string |
|
75 | 75 | { |
76 | 76 | return view('components.markdown'); |
77 | 77 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | /** |
29 | 29 | * Get the view / contents that represent the component. |
30 | 30 | */ |
31 | - public function render(): View|Closure|string |
|
31 | + public function render(): View | Closure | string |
|
32 | 32 | { |
33 | 33 | return view('components.modal'); |
34 | 34 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | /** |
41 | 41 | * Get the view / contents that represent the component. |
42 | 42 | */ |
43 | - public function render(): View|Closure|string |
|
43 | + public function render(): View | Closure | string |
|
44 | 44 | { |
45 | 45 | return view('components.header'); |
46 | 46 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | public string $uuid; |
12 | 12 | |
13 | 13 | public function __construct( |
14 | - public object|array $item, |
|
14 | + public object | array $item, |
|
15 | 15 | public string $avatar = 'avatar', |
16 | 16 | public string $value = 'name', |
17 | 17 | public ?string $subValue = '', |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * Get the view / contents that represent the component. |
30 | 30 | */ |
31 | - public function render(): View|Closure|string |
|
31 | + public function render(): View | Closure | string |
|
32 | 32 | { |
33 | 33 | return view('components.list-item'); |
34 | 34 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public ?string $optionAvatar = 'avatar', |
41 | 41 | public ?bool $valuesAsString = false, |
42 | 42 | public ?string $height = 'max-h-64', |
43 | - public Collection|array $options = new Collection(), |
|
43 | + public Collection | array $options = new Collection(), |
|
44 | 44 | public ?string $noResultText = 'No results found.', |
45 | 45 | |
46 | 46 | // Validations |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | return "'$value'"; |
96 | 96 | } |
97 | 97 | |
98 | - return is_numeric($value) && ! str($value)->startsWith('0') ? $value : "'$value'"; |
|
98 | + return is_numeric($value) && !str($value)->startsWith('0') ? $value : "'$value'"; |
|
99 | 99 | } |
100 | 100 | /** |
101 | 101 | * Get the view / contents that represent the component. |
102 | 102 | */ |
103 | - public function render(): View|Closure|string |
|
103 | + public function render(): View | Closure | string |
|
104 | 104 | { |
105 | 105 | return view('components.choices'); |
106 | 106 | } |