@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Roave\ApiCompare\Comparator\Variance; |
6 | 6 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | return false; |
33 | 33 | } |
34 | 34 | |
35 | - if ($type->allowsNull() && ! $comparedType->allowsNull()) { |
|
35 | + if ($type->allowsNull() && !$comparedType->allowsNull()) { |
|
36 | 36 | return false; |
37 | 37 | } |
38 | 38 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | return true; |
49 | 49 | } |
50 | 50 | |
51 | - if (strtolower($comparedTypeAsString) === 'object' && ! $type->isBuiltin()) { |
|
51 | + if (strtolower($comparedTypeAsString) === 'object' && !$type->isBuiltin()) { |
|
52 | 52 | // `object` is always contravariant to any object type |
53 | 53 | return true; |
54 | 54 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassBased; |
6 | 6 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | return array_merge( |
212 | 212 | [[null]], |
213 | 213 | array_merge(...array_map( |
214 | - function (string $type) use ($reflector) : array { |
|
214 | + function(string $type) use ($reflector) : array { |
|
215 | 215 | return [ |
216 | 216 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
217 | 217 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassBased; |
6 | 6 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | return array_merge( |
221 | 221 | [[null]], |
222 | 222 | array_merge(...array_map( |
223 | - function (string $type) use ($reflector) : array { |
|
223 | + function(string $type) use ($reflector) : array { |
|
224 | 224 | return [ |
225 | 225 | [ReflectionType::createFromTypeAndReflector($type, false, $reflector)], |
226 | 226 | [ReflectionType::createFromTypeAndReflector($type, true, $reflector)], |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassConstantBased; |
6 | 6 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | self::assertSame( |
36 | 36 | $expectedMessages, |
37 | - array_map(function (Change $change) : string { |
|
37 | + array_map(function(Change $change) : string { |
|
38 | 38 | return $change->__toString(); |
39 | 39 | }, iterator_to_array($changes)) |
40 | 40 | ); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | return array_combine( |
113 | 113 | array_keys($properties), |
114 | 114 | array_map( |
115 | - function (string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
115 | + function(string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
116 | 116 | return [ |
117 | 117 | $fromClass->getReflectionConstant($constant), |
118 | 118 | $toClass->getReflectionConstant($constant), |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassConstantBased; |
6 | 6 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | self::assertSame( |
38 | 38 | $expectedMessages, |
39 | - array_map(function (Change $change) : string { |
|
39 | + array_map(function(Change $change) : string { |
|
40 | 40 | return $change->__toString(); |
41 | 41 | }, iterator_to_array($changes)) |
42 | 42 | ); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return array_combine( |
129 | 129 | array_keys($properties), |
130 | 130 | array_map( |
131 | - function (string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
131 | + function(string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
132 | 132 | return [ |
133 | 133 | $fromClass->getReflectionConstant($constant), |
134 | 134 | $toClass->getReflectionConstant($constant), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassConstantBased; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\FunctionBased; |
6 | 6 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | self::assertSame( |
37 | 37 | $expectedMessages, |
38 | - array_map(function (Change $change) : string { |
|
38 | + array_map(function(Change $change) : string { |
|
39 | 39 | return $change->__toString(); |
40 | 40 | }, iterator_to_array($changes)) |
41 | 41 | ); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | array_combine( |
117 | 117 | array_keys($functions), |
118 | 118 | array_map( |
119 | - function (string $function, array $errorMessages) use ($fromReflector, $toReflector) : array { |
|
119 | + function(string $function, array $errorMessages) use ($fromReflector, $toReflector) : array { |
|
120 | 120 | return [ |
121 | 121 | $fromReflector->reflect($function), |
122 | 122 | $toReflector->reflect($function), |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\FunctionBased; |
6 | 6 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | self::assertSame( |
37 | 37 | $expectedMessages, |
38 | - array_map(function (Change $change) : string { |
|
38 | + array_map(function(Change $change) : string { |
|
39 | 39 | return $change->__toString(); |
40 | 40 | }, iterator_to_array($changes)) |
41 | 41 | ); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | array_combine( |
111 | 111 | array_keys($functions), |
112 | 112 | array_map( |
113 | - function (string $function, array $errorMessages) use ($fromReflector, $toReflector) : array { |
|
113 | + function(string $function, array $errorMessages) use ($fromReflector, $toReflector) : array { |
|
114 | 114 | return [ |
115 | 115 | $fromReflector->reflect($function), |
116 | 116 | $toReflector->reflect($function), |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\FunctionBased; |
6 | 6 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | self::assertSame( |
37 | 37 | $expectedMessages, |
38 | - array_map(function (Change $change) : string { |
|
38 | + array_map(function(Change $change) : string { |
|
39 | 39 | return $change->__toString(); |
40 | 40 | }, iterator_to_array($changes)) |
41 | 41 | ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | array_combine( |
122 | 122 | array_keys($functions), |
123 | 123 | array_map( |
124 | - function (string $function, array $errorMessages) use ($fromReflector, $toReflector) : array { |
|
124 | + function(string $function, array $errorMessages) use ($fromReflector, $toReflector) : array { |
|
125 | 125 | return [ |
126 | 126 | $fromReflector->reflect($function), |
127 | 127 | $toReflector->reflect($function), |