@@ -23,14 +23,14 @@ |
||
23 | 23 | $this->element = new NetteEnumCase($name); |
24 | 24 | } |
25 | 25 | |
26 | - public function setValue(string|int|null $value): self |
|
26 | + public function setValue(string | int | null $value): self |
|
27 | 27 | { |
28 | 28 | $this->element->setValue($value); |
29 | 29 | |
30 | 30 | return $this; |
31 | 31 | } |
32 | 32 | |
33 | - public function getValue(): string|int|null|Literal |
|
33 | + public function getValue(): string | int | null | Literal |
|
34 | 34 | { |
35 | 35 | return $this->element->getValue(); |
36 | 36 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $type = $this->element->getType(false); |
48 | 48 | |
49 | - return $type === null ? null : (string) $type; |
|
49 | + return $type === null ? null : (string)$type; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | public function setNullable(bool $state = true): self |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * @internal |
83 | 83 | */ |
84 | - public static function fromElement(NetteParameter|NettePromotedParameter $element): static |
|
84 | + public static function fromElement(NetteParameter | NettePromotedParameter $element): static |
|
85 | 85 | { |
86 | 86 | $parameter = new static($element->getName()); |
87 | 87 |
@@ -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 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $this->element = new TraitType($name); |
24 | 24 | } |
25 | 25 | |
26 | - public function addMember(Method|Property|Constant|TraitUse $member): static |
|
26 | + public function addMember(Method | Property | Constant | TraitUse $member): static |
|
27 | 27 | { |
28 | 28 | $this->element->addMember($member->getElement()); |
29 | 29 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | public function __construct( |
12 | 12 | protected FilesInterface $files |
13 | - ) { |
|
13 | + ){ |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function write(string $filename, FileDeclaration $file): bool |
@@ -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; |
@@ -48,9 +48,9 @@ |
||
48 | 48 | return self::fromElement((new Factory())->fromCode($code)); |
49 | 49 | } |
50 | 50 | |
51 | - public function addNamespace(string|PhpNamespace $namespace): PhpNamespace |
|
51 | + public function addNamespace(string | PhpNamespace $namespace): PhpNamespace |
|
52 | 52 | { |
53 | - if ($namespace instanceof PhpNamespace) { |
|
53 | + if ($namespace instanceof PhpNamespace){ |
|
54 | 54 | $this->element->addNamespace($namespace->getElement()); |
55 | 55 | |
56 | 56 | return $namespace; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | final class ValidationProviderTest extends TestCase |
13 | 13 | { |
14 | - private m\MockInterface|InvokerInterface $invoker; |
|
14 | + private m\MockInterface | InvokerInterface $invoker; |
|
15 | 15 | private ValidationProvider $provider; |
16 | 16 | |
17 | 17 | protected function setUp(): void |
@@ -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 | } |