@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | class InterfaceValidator extends BaseInheritanceValidator |
22 | 22 | { |
23 | 23 | /** |
24 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
25 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
24 | + * @param TypeDefinition $child |
|
25 | + * @param TypeDefinition $parent |
|
26 | 26 | * @return bool |
27 | 27 | */ |
28 | 28 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
36 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
35 | + * @param TypeDefinition $child |
|
36 | + * @param TypeDefinition $parent |
|
37 | 37 | * @return void |
38 | 38 | * @throws TypeConflictException |
39 | 39 | */ |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
56 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
57 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
56 | + * @param TypeDefinition $child |
|
57 | + * @param TypeDefinition $parent |
|
58 | 58 | * @return void |
59 | 59 | * @throws TypeConflictException |
60 | 60 | */ |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Reflection\Validation\Inheritance; |
11 | 11 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | /** @var ObjectDefinition $object */ |
64 | 64 | $object = $child->getTypeDefinition(); |
65 | 65 | |
66 | - if (! $object->hasInterface($parent->getTypeDefinition()->getName())) { |
|
66 | + if (!$object->hasInterface($parent->getTypeDefinition()->getName())) { |
|
67 | 67 | $error = \vsprintf('%s in %s definition must be instance of %s', [ |
68 | 68 | $object, $child, |
69 | 69 | $parent->getTypeDefinition(), |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | class ObjectValidator extends BaseInheritanceValidator |
21 | 21 | { |
22 | 22 | /** |
23 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
24 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
23 | + * @param TypeDefinition $child |
|
24 | + * @param TypeDefinition $parent |
|
25 | 25 | * @return bool |
26 | 26 | */ |
27 | 27 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
35 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
34 | + * @param TypeDefinition $child |
|
35 | + * @param TypeDefinition $parent |
|
36 | 36 | * @return void |
37 | 37 | * @throws TypeConflictException |
38 | 38 | */ |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Reflection\Validation\Inheritance; |
11 | 11 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | { |
41 | 41 | \assert($parent->getTypeDefinition() instanceof ObjectDefinition); |
42 | 42 | |
43 | - if (! $this->isEqualType($child, $parent)) { |
|
43 | + if (!$this->isEqualType($child, $parent)) { |
|
44 | 44 | $this->throwIncompatibleTypes($child, $parent); |
45 | 45 | } |
46 | 46 | } |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | class ScalarValidator extends BaseInheritanceValidator |
21 | 21 | { |
22 | 22 | /** |
23 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
24 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
23 | + * @param TypeDefinition $child |
|
24 | + * @param TypeDefinition $parent |
|
25 | 25 | * @return bool |
26 | 26 | */ |
27 | 27 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
35 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
34 | + * @param TypeDefinition $child |
|
35 | + * @param TypeDefinition $parent |
|
36 | 36 | * @return void |
37 | 37 | * @throws TypeConflictException |
38 | 38 | */ |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
50 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
49 | + * @param TypeDefinition $child |
|
50 | + * @param TypeDefinition $parent |
|
51 | 51 | * @return void |
52 | 52 | * @throws TypeConflictException |
53 | 53 | */ |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
63 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
64 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
63 | + * @param TypeDefinition $child |
|
64 | + * @param TypeDefinition $parent |
|
65 | 65 | * @return void |
66 | 66 | * @throws TypeConflictException |
67 | 67 | */ |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
79 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
78 | + * @param TypeDefinition $child |
|
79 | + * @param TypeDefinition $parent |
|
80 | 80 | * @return void |
81 | 81 | * @throws TypeConflictException |
82 | 82 | */ |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
94 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
93 | + * @param TypeDefinition $child |
|
94 | + * @param TypeDefinition $parent |
|
95 | 95 | * @return void |
96 | 96 | * @throws TypeConflictException |
97 | 97 | */ |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Reflection\Validation\Inheritance; |
11 | 11 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $parentType = $parent->getTypeDefinition(); |
71 | 71 | |
72 | - if (! ($child->getTypeDefinition() instanceof $parentType)) { |
|
72 | + if (!($child->getTypeDefinition() instanceof $parentType)) { |
|
73 | 73 | $this->throwScalarIncompatibilityException($child, $parent); |
74 | 74 | } |
75 | 75 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | { |
85 | 85 | $childType = $child->getTypeDefinition(); |
86 | 86 | |
87 | - if (! ($parent->getTypeDefinition() instanceof $childType)) { |
|
87 | + if (!($parent->getTypeDefinition() instanceof $childType)) { |
|
88 | 88 | $this->throwScalarIncompatibilityException($child, $parent); |
89 | 89 | } |
90 | 90 | } |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | class UnionValidator extends BaseInheritanceValidator |
22 | 22 | { |
23 | 23 | /** |
24 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
25 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
24 | + * @param TypeDefinition $child |
|
25 | + * @param TypeDefinition $parent |
|
26 | 26 | * @return bool |
27 | 27 | */ |
28 | 28 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
36 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
35 | + * @param TypeDefinition $child |
|
36 | + * @param TypeDefinition $parent |
|
37 | 37 | * @return void |
38 | 38 | * @throws TypeConflictException |
39 | 39 | */ |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
53 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
52 | + * @param TypeDefinition $child |
|
53 | + * @param TypeDefinition $parent |
|
54 | 54 | * @return bool |
55 | 55 | */ |
56 | 56 | private function isUnionContainsChild(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Reflection\Validation\Inheritance; |
11 | 11 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | private function validateUnionContainsChild(TypeDefinition $child, TypeDefinition $parent): void |
92 | 92 | { |
93 | - if (! $this->isUnionContainsChild($child, $parent)) { |
|
93 | + if (!$this->isUnionContainsChild($child, $parent)) { |
|
94 | 94 | $this->throwIncompatibleTypes($child, $parent); |
95 | 95 | } |
96 | 96 | } |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | class WrapperValidator extends BaseInheritanceValidator |
21 | 21 | { |
22 | 22 | /** |
23 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
24 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
23 | + * @param TypeDefinition $child |
|
24 | + * @param TypeDefinition $parent |
|
25 | 25 | * @return bool |
26 | 26 | */ |
27 | 27 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
35 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
34 | + * @param TypeDefinition $child |
|
35 | + * @param TypeDefinition $parent |
|
36 | 36 | * @return void |
37 | 37 | * @throws \Railt\SDL\Exceptions\TypeConflictException |
38 | 38 | * @throws \OutOfBoundsException |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * @param AllowsTypeIndication|DependentDefinition $child |
|
128 | - * @param AllowsTypeIndication|DependentDefinition $parent |
|
127 | + * @param AllowsTypeIndication $child |
|
128 | + * @param AllowsTypeIndication $parent |
|
129 | 129 | * @return void |
130 | 130 | * @throws TypeConflictException |
131 | 131 | */ |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
148 | - * @param AllowsTypeIndication|DependentDefinition $child |
|
149 | - * @param AllowsTypeIndication|DependentDefinition $parent |
|
148 | + * @param AllowsTypeIndication $child |
|
149 | + * @param AllowsTypeIndication $parent |
|
150 | 150 | * @return void |
151 | 151 | * @throws \Railt\SDL\Exceptions\TypeConflictException |
152 | 152 | */ |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Reflection\Validation\Inheritance; |
11 | 11 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | private function validateListDirectRedefinition(AllowsTypeIndication $child, AllowsTypeIndication $parent): void |
89 | 89 | { |
90 | - $isBrokenDirectRedefinition = $parent->isList() && ! $child->isList(); |
|
90 | + $isBrokenDirectRedefinition = $parent->isList() && !$child->isList(); |
|
91 | 91 | |
92 | 92 | if ($isBrokenDirectRedefinition) { |
93 | 93 | $error = \sprintf('The %s cannot be overridden by non-list, but %s given', $parent, $child); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | private function validateListInverseRedefinition(AllowsTypeIndication $child, AllowsTypeIndication $parent): void |
117 | 117 | { |
118 | - $isBrokenInverseRedefinition = ! $parent->isList() && $child->isList(); |
|
118 | + $isBrokenInverseRedefinition = !$parent->isList() && $child->isList(); |
|
119 | 119 | |
120 | 120 | if ($isBrokenInverseRedefinition) { |
121 | 121 | $error = \sprintf('The %s cannot be overridden by list, but %s given', $parent, $child); |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function validatePostconditionalInheritance(AllowsTypeIndication $child, AllowsTypeIndication $parent): void |
133 | 133 | { |
134 | - $invalidWrapperInheritance = $parent->isNonNull() && ! $child->isNonNull(); |
|
134 | + $invalidWrapperInheritance = $parent->isNonNull() && !$child->isNonNull(); |
|
135 | 135 | |
136 | 136 | $invalidListWrapperInheritance = $this->isSameWrapperList($child, $parent) && |
137 | - $parent->isListOfNonNulls() && ! $child->isListOfNonNulls(); |
|
137 | + $parent->isListOfNonNulls() && !$child->isListOfNonNulls(); |
|
138 | 138 | |
139 | 139 | if ($invalidWrapperInheritance || $invalidListWrapperInheritance) { |
140 | 140 | $error = '%s postcondition of %s can not be weakened by %s of %s'; |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | */ |
153 | 153 | private function validatePreconditionalInheritance(AllowsTypeIndication $child, AllowsTypeIndication $parent): void |
154 | 154 | { |
155 | - $invalidWrapperInheritance = ! $parent->isNonNull() && $child->isNonNull(); |
|
155 | + $invalidWrapperInheritance = !$parent->isNonNull() && $child->isNonNull(); |
|
156 | 156 | |
157 | 157 | $invalidListWrapperInheritance = $this->isSameWrapperList($child, $parent) && |
158 | - ! $parent->isListOfNonNulls() && $child->isListOfNonNulls(); |
|
158 | + !$parent->isListOfNonNulls() && $child->isListOfNonNulls(); |
|
159 | 159 | |
160 | 160 | if ($invalidWrapperInheritance || $invalidListWrapperInheritance) { |
161 | 161 | $error = '%s precondition of %s can not be strengthened by %s of %s'; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Runtime; |
11 | 11 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Runtime; |
11 | 11 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Runtime; |
11 | 11 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\SDL\Runtime; |
11 | 11 |