@@ -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 | } |
@@ -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\Reflection\Validation\Inheritance; |
11 | 11 |
@@ -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 @@ 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(), |
@@ -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 | } |
@@ -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 InputDefinition); |
42 | 42 | |
43 | - if (! $this->isEqualType($child, $parent)) { |
|
43 | + if (!$this->isEqualType($child, $parent)) { |
|
44 | 44 | $this->throwIncompatibleTypes($child, $parent); |
45 | 45 | } |
46 | 46 | } |
@@ -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; |
11 | 11 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | protected function getDefaultMatcher(): \Closure |
37 | 37 | { |
38 | - return function (Definitions\DefinitionValidator $validator, Definition $definition): bool { |
|
38 | + return function(Definitions\DefinitionValidator $validator, Definition $definition): bool { |
|
39 | 39 | return $validator->match($definition); |
40 | 40 | }; |
41 | 41 | } |
@@ -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\Reflection\Validation\Base; |
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\Reflection\Validation\Base; |
11 | 11 |