@@ -17,7 +17,7 @@ |
||
17 | 17 | return Changes::empty(); |
18 | 18 | } |
19 | 19 | |
20 | - if (! $toClass->isFinal()) { |
|
20 | + if (!$toClass->isFinal()) { |
|
21 | 21 | return Changes::empty(); |
22 | 22 | } |
23 | 23 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | return array_reduce( |
24 | 24 | $this->checks, |
25 | - function (Changes $changes, ClassBased $check) use ($fromClass, $toClass) : Changes { |
|
25 | + function(Changes $changes, ClassBased $check) use ($fromClass, $toClass) : Changes { |
|
26 | 26 | return $changes->mergeWith($check->__invoke($fromClass, $toClass)); |
27 | 27 | }, |
28 | 28 | Changes::empty() |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
20 | 20 | { |
21 | - if ($fromClass->isInterface() || ! $toClass->isInterface()) { |
|
21 | + if ($fromClass->isInterface() || !$toClass->isInterface()) { |
|
22 | 22 | // checking whether a class became an interface is done in `InterfaceBecameClass` |
23 | 23 | return Changes::empty(); |
24 | 24 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | return Changes::empty(); |
24 | 24 | } |
25 | 25 | |
26 | - if ($fromClass->isAbstract() || ! $toClass->isAbstract()) { |
|
26 | + if ($fromClass->isAbstract() || !$toClass->isAbstract()) { |
|
27 | 27 | return Changes::empty(); |
28 | 28 | } |
29 | 29 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | return array_reduce( |
35 | 35 | array_keys($commonMethods), |
36 | - function (Changes $accumulator, string $methodName) use ($methodsFrom, $methodsTo) : Changes { |
|
36 | + function(Changes $accumulator, string $methodName) use ($methodsFrom, $methodsTo) : Changes { |
|
37 | 37 | return $accumulator->mergeWith($this->checkMethod->__invoke( |
38 | 38 | $methodsFrom[$methodName], |
39 | 39 | $methodsTo[$methodName] |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $methods = $class->getMethods(); |
50 | 50 | |
51 | 51 | return array_combine( |
52 | - array_map(function (ReflectionMethod $method) : string { |
|
52 | + array_map(function(ReflectionMethod $method) : string { |
|
53 | 53 | return strtolower($method->getName()); |
54 | 54 | }, $methods), |
55 | 55 | $methods |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
21 | 21 | { |
22 | - if (! $fromClass->isFinal()) { |
|
22 | + if (!$fromClass->isFinal()) { |
|
23 | 23 | return Changes::empty(); |
24 | 24 | } |
25 | 25 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | return array_reduce( |
31 | 31 | array_keys($commonConstants), |
32 | - function (Changes $accumulator, string $constantName) use ($constantsFrom, $constantsTo) : Changes { |
|
32 | + function(Changes $accumulator, string $constantName) use ($constantsFrom, $constantsTo) : Changes { |
|
33 | 33 | return $accumulator->mergeWith($this->checkConstant->__invoke( |
34 | 34 | $constantsFrom[$constantName], |
35 | 35 | $constantsTo[$constantName] |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $this->accessibleConstants($toClass) |
24 | 24 | ); |
25 | 25 | |
26 | - return Changes::fromList(...array_values(array_map(function (ReflectionClassConstant $constant) use ($fromClass) : Change { |
|
26 | + return Changes::fromList(...array_values(array_map(function(ReflectionClassConstant $constant) use ($fromClass) : Change { |
|
27 | 27 | return Change::removed( |
28 | 28 | sprintf('Constant %s::%s was removed', $fromClass->getName(), $constant->getName()), |
29 | 29 | true |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** @return ReflectionClassConstant[] */ |
35 | 35 | private function accessibleConstants(ReflectionClass $class) : array |
36 | 36 | { |
37 | - return array_filter($class->getReflectionConstants(), function (ReflectionClassConstant $constant) : bool { |
|
37 | + return array_filter($class->getReflectionConstants(), function(ReflectionClassConstant $constant) : bool { |
|
38 | 38 | return $constant->isPublic() || $constant->isProtected(); |
39 | 39 | }); |
40 | 40 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | return array_reduce( |
31 | 31 | array_keys($commonProperties), |
32 | - function (Changes $accumulator, string $propertyName) use ($propertiesFrom, $propertiesTo) : Changes { |
|
32 | + function(Changes $accumulator, string $propertyName) use ($propertiesFrom, $propertiesTo) : Changes { |
|
33 | 33 | return $accumulator->mergeWith($this->checkProperty->__invoke( |
34 | 34 | $propertiesFrom[$propertyName], |
35 | 35 | $propertiesTo[$propertyName] |