@@ -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] |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | array_change_key_case($this->accessibleMethods($toClass), CASE_UPPER) |
36 | 36 | ); |
37 | 37 | |
38 | - return Changes::fromList(...array_values(array_map(function (ReflectionMethod $method) : Change { |
|
38 | + return Changes::fromList(...array_values(array_map(function(ReflectionMethod $method) : Change { |
|
39 | 39 | return Change::removed( |
40 | 40 | sprintf('Method %s was removed', $this->formatFunction->__invoke($method)), |
41 | 41 | true |
@@ -46,12 +46,12 @@ discard block |
||
46 | 46 | /** @return ReflectionMethod[] */ |
47 | 47 | private function accessibleMethods(ReflectionClass $class) : array |
48 | 48 | { |
49 | - $methods = array_filter($class->getMethods(), function (ReflectionMethod $method) : bool { |
|
49 | + $methods = array_filter($class->getMethods(), function(ReflectionMethod $method) : bool { |
|
50 | 50 | return $method->isPublic() || $method->isProtected(); |
51 | 51 | }); |
52 | 52 | |
53 | 53 | return array_combine( |
54 | - array_map(function (ReflectionMethod $method) : string { |
|
54 | + array_map(function(ReflectionMethod $method) : string { |
|
55 | 55 | return $method->getName(); |
56 | 56 | }, $methods), |
57 | 57 | $methods |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
20 | 20 | { |
21 | - if ($fromClass->isTrait() || ! $toClass->isTrait()) { |
|
21 | + if ($fromClass->isTrait() || !$toClass->isTrait()) { |
|
22 | 22 | return Changes::empty(); |
23 | 23 | } |
24 | 24 |
@@ -71,13 +71,13 @@ |
||
71 | 71 | { |
72 | 72 | $optionalParameters = array_values(array_filter( |
73 | 73 | $function->getParameters(), |
74 | - function (ReflectionParameter $parameter) : bool { |
|
74 | + function(ReflectionParameter $parameter) : bool { |
|
75 | 75 | return $parameter->isDefaultValueAvailable(); |
76 | 76 | } |
77 | 77 | )); |
78 | 78 | |
79 | 79 | return array_combine( |
80 | - array_map(function (ReflectionParameter $parameter) : int { |
|
80 | + array_map(function(ReflectionParameter $parameter) : int { |
|
81 | 81 | return $parameter->getPosition(); |
82 | 82 | }, $optionalParameters), |
83 | 83 | $optionalParameters |
@@ -74,7 +74,7 @@ |
||
74 | 74 | |
75 | 75 | private function typeToString(?ReflectionType $type) : string |
76 | 76 | { |
77 | - if (! $type) { |
|
77 | + if (!$type) { |
|
78 | 78 | return 'no type'; |
79 | 79 | } |
80 | 80 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | |
75 | 75 | private function typeToString(?ReflectionType $type) : string |
76 | 76 | { |
77 | - if (! $type) { |
|
77 | + if (!$type) { |
|
78 | 78 | return 'no type'; |
79 | 79 | } |
80 | 80 |