@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | )); |
85 | 85 | } |
86 | 86 | |
87 | - public function addCase(string $name, string|int|null $value = null): EnumCase |
|
87 | + public function addCase(string $name, string | int | null $value = null): EnumCase |
|
88 | 88 | { |
89 | 89 | return EnumCase::fromElement($this->element->addCase($name, $value)); |
90 | 90 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | return $this; |
102 | 102 | } |
103 | 103 | |
104 | - public function addMember(Method|Constant|EnumCase|TraitUse $member): static |
|
104 | + public function addMember(Method | Constant | EnumCase | TraitUse $member): static |
|
105 | 105 | { |
106 | 106 | $this->element->addMember($member->getElement()); |
107 | 107 |
@@ -89,7 +89,7 @@ |
||
89 | 89 | return $this; |
90 | 90 | } |
91 | 91 | |
92 | - public function addMember(Method|Property|Constant|TraitUse $member): static |
|
92 | + public function addMember(Method | Property | Constant | TraitUse $member): static |
|
93 | 93 | { |
94 | 94 | $this->element->addMember($member->getElement()); |
95 | 95 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | enum Visibility: string |
8 | 8 | { |
9 | - case PUBLIC = 'public'; |
|
10 | - case PROTECTED = 'protected'; |
|
11 | - case PRIVATE = 'private'; |
|
9 | + case public = 'public'; |
|
10 | + case protected = 'protected'; |
|
11 | + case private = 'private'; |
|
12 | 12 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | { |
59 | 59 | $type = $this->element->getType(); |
60 | 60 | |
61 | - return $type === null ? null : (string) $type; |
|
61 | + return $type === null ? null : (string)$type; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | public function setNullable(bool $state = true): self |
@@ -63,7 +63,8 @@ |
||
63 | 63 | |
64 | 64 | public function addNamespace(string|PhpNamespace $namespace): PhpNamespace |
65 | 65 | { |
66 | - if ($namespace instanceof PhpNamespace) { |
|
66 | + if ($namespace instanceof PhpNamespace) |
|
67 | + { |
|
67 | 68 | $this->element->addNamespace($namespace->getElement()); |
68 | 69 | |
69 | 70 | return $namespace; |
@@ -59,9 +59,9 @@ |
||
59 | 59 | return $file; |
60 | 60 | } |
61 | 61 | |
62 | - public function addNamespace(string|PhpNamespace $namespace): PhpNamespace |
|
62 | + public function addNamespace(string | PhpNamespace $namespace): PhpNamespace |
|
63 | 63 | { |
64 | - if ($namespace instanceof PhpNamespace) { |
|
64 | + if ($namespace instanceof PhpNamespace){ |
|
65 | 65 | $this->element->addNamespace($namespace->getElement()); |
66 | 66 | |
67 | 67 | return $namespace; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | /** |
15 | 15 | * Create validator copy with new data set. |
16 | 16 | */ |
17 | - public function withData(array|object $data): ValidatorInterface; |
|
17 | + public function withData(array | object $data): ValidatorInterface; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Receive field from context data or return default value. |
@@ -17,5 +17,5 @@ |
||
17 | 17 | * @param mixed $context Validation context (available for checkers and validation |
18 | 18 | * methods but is not validated). |
19 | 19 | */ |
20 | - public function validate(array|object $data, array $rules, mixed $context = null): ValidatorInterface; |
|
20 | + public function validate(array | object $data, array $rules, mixed $context = null): ValidatorInterface; |
|
21 | 21 | } |
@@ -24,11 +24,13 @@ discard block |
||
24 | 24 | |
25 | 25 | public function confirmToProceed(string $message = 'Application in production.'): bool |
26 | 26 | { |
27 | - if (!$this->appEnv->isProduction()) { |
|
27 | + if (!$this->appEnv->isProduction()) |
|
28 | + { |
|
28 | 29 | return true; |
29 | 30 | } |
30 | 31 | |
31 | - if ($this->hasOption('force') && $this->option('force')) { |
|
32 | + if ($this->hasOption('force') && $this->option('force')) |
|
33 | + { |
|
32 | 34 | return true; |
33 | 35 | } |
34 | 36 | |
@@ -36,7 +38,8 @@ discard block |
||
36 | 38 | |
37 | 39 | $confirmed = $this->confirm('Do you really wish to run command?'); |
38 | 40 | |
39 | - if (!$confirmed) { |
|
41 | + if (!$confirmed) |
|
42 | + { |
|
40 | 43 | $this->comment('Command Canceled!'); |
41 | 44 | |
42 | 45 | return false; |
@@ -21,18 +21,18 @@ discard block |
||
21 | 21 | private readonly AppEnvironment $appEnv, |
22 | 22 | InputInterface $input, |
23 | 23 | OutputInterface $output, |
24 | - ) { |
|
24 | + ){ |
|
25 | 25 | $this->input = $input; |
26 | 26 | $this->output = $output instanceof SymfonyStyle ? $output : new SymfonyStyle($input, $output); |
27 | 27 | } |
28 | 28 | |
29 | 29 | public function confirmToProceed(string $message = 'Application in production.'): bool |
30 | 30 | { |
31 | - if (!$this->appEnv->isProduction()) { |
|
31 | + if (!$this->appEnv->isProduction()){ |
|
32 | 32 | return true; |
33 | 33 | } |
34 | 34 | |
35 | - if ($this->hasOption('force') && $this->option('force')) { |
|
35 | + if ($this->hasOption('force') && $this->option('force')){ |
|
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $confirmed = $this->confirm('Do you really wish to run command?'); |
42 | 42 | |
43 | - if (!$confirmed) { |
|
43 | + if (!$confirmed){ |
|
44 | 44 | $this->comment('Command Canceled!'); |
45 | 45 | |
46 | 46 | return false; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | use Spiral\Core\Container\Autowire; |
7 | 7 | use Spiral\Router\RouterInterface; |
8 | 8 | |
9 | -if (!\function_exists('bind')) { |
|
9 | +if (!\function_exists('bind')){ |
|
10 | 10 | /** |
11 | 11 | * Shortcut to container Autowire definition. |
12 | 12 | * |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | -if (!\function_exists('route')) { |
|
24 | +if (!\function_exists('route')){ |
|
25 | 25 | /** |
26 | 26 | * Generate the URL to a named route. |
27 | 27 | * |
@@ -6,7 +6,8 @@ discard block |
||
6 | 6 | use Spiral\Core\Container\Autowire; |
7 | 7 | use Spiral\Router\RouterInterface; |
8 | 8 | |
9 | -if (!\function_exists('bind')) { |
|
9 | +if (!\function_exists('bind')) |
|
10 | +{ |
|
10 | 11 | /** |
11 | 12 | * Shortcut to container Autowire definition. |
12 | 13 | * |
@@ -21,7 +22,8 @@ discard block |
||
21 | 22 | } |
22 | 23 | } |
23 | 24 | |
24 | -if (!\function_exists('route')) { |
|
25 | +if (!\function_exists('route')) |
|
26 | +{ |
|
25 | 27 | /** |
26 | 28 | * Generate the URL to a named route. |
27 | 29 | * |