@@ -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 | ); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | return array_combine( |
| 123 | 123 | array_keys($properties), |
| 124 | 124 | array_map( |
| 125 | - function (string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 125 | + function(string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 126 | 126 | return [ |
| 127 | 127 | $fromClass->getMethod($methodName), |
| 128 | 128 | $toClass->getMethod($methodName), |
@@ -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 | ); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | return array_combine( |
| 109 | 109 | array_keys($properties), |
| 110 | 110 | array_map( |
| 111 | - function (string $method, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 111 | + function(string $method, array $errorMessages) use ($fromClass, $toClass) : array { |
|
| 112 | 112 | return [ |
| 113 | 113 | $fromClass->getMethod($method), |
| 114 | 114 | $toClass->getMethod($method), |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | return array_combine( |
| 64 | 64 | array_keys($properties), |
| 65 | 65 | array_map( |
| 66 | - function (string $expectedMessage, ReflectionProperty $property) : array { |
|
| 66 | + function(string $expectedMessage, ReflectionProperty $property) : array { |
|
| 67 | 67 | return [$property, $expectedMessage]; |
| 68 | 68 | }, |
| 69 | 69 | array_keys($properties), |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | $output->expects(self::any()) |
| 38 | 38 | ->method('writeln') |
| 39 | - ->willReturnCallback(function (string $output) use ($changeToExpect) : void { |
|
| 39 | + ->willReturnCallback(function(string $output) use ($changeToExpect) : void { |
|
| 40 | 40 | self::assertContains($changeToExpect, $output); |
| 41 | 41 | }); |
| 42 | 42 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | return false; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - if ($comparedType->allowsNull() && ! $type->allowsNull()) { |
|
| 33 | + if ($comparedType->allowsNull() && !$type->allowsNull()) { |
|
| 34 | 34 | return false; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if (strtolower($typeAsString) === 'object' && ! $comparedType->isBuiltin()) { |
|
| 49 | + if (strtolower($typeAsString) === 'object' && !$comparedType->isBuiltin()) { |
|
| 50 | 50 | // `object` is not covariant to a defined class type |
| 51 | 51 | return true; |
| 52 | 52 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | return true; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - if (strtolower($typeAsString) === 'iterable' && ! $comparedType->isBuiltin()) { |
|
| 59 | + if (strtolower($typeAsString) === 'iterable' && !$comparedType->isBuiltin()) { |
|
| 60 | 60 | if ($comparedType->targetReflectionClass()->implementsInterface(\Traversable::class)) { |
| 61 | 61 | // `iterable` can be restricted via any `Iterator` implementation |
| 62 | 62 | return true; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | return false; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if ($type->allowsNull() && ! $comparedType->allowsNull()) { |
|
| 32 | + if ($type->allowsNull() && !$comparedType->allowsNull()) { |
|
| 33 | 33 | return false; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | return true; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if (strtolower($comparedTypeAsString) === 'object' && ! $type->isBuiltin()) { |
|
| 48 | + if (strtolower($comparedTypeAsString) === 'object' && !$type->isBuiltin()) { |
|
| 49 | 49 | // `object` is always contravariant to any object type |
| 50 | 50 | return true; |
| 51 | 51 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function compare(ReflectionClassConstant $fromConstant, ReflectionClassConstant $toConstant) : Changes |
| 21 | 21 | { |
| 22 | - if (! $fromConstant->isProtected()) { |
|
| 22 | + if (!$fromConstant->isProtected()) { |
|
| 23 | 23 | return Changes::new(); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function compare(ReflectionClassConstant $fromConstant, ReflectionClassConstant $toConstant) : Changes |
| 21 | 21 | { |
| 22 | - if (! $fromConstant->isPublic()) { |
|
| 22 | + if (!$fromConstant->isPublic()) { |
|
| 23 | 23 | return Changes::new(); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | return array_reduce( |
| 24 | 24 | $this->checks, |
| 25 | - function (Changes $changes, ClassConstantBased $check) use ($fromConstant, $toConstant) : Changes { |
|
| 25 | + function(Changes $changes, ClassConstantBased $check) use ($fromConstant, $toConstant) : Changes { |
|
| 26 | 26 | return $changes->mergeWith($check->compare($fromConstant, $toConstant)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::new() |