@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | return array_reduce( |
| 24 | 24 | $this->checks, |
| 25 | - function (Changes $changes, PropertyBased $check) use ($fromProperty, $toProperty) : Changes { |
|
| 25 | + function(Changes $changes, PropertyBased $check) use ($fromProperty, $toProperty) : Changes { |
|
| 26 | 26 | return $changes->mergeWith($check->compare($fromProperty, $toProperty)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::new() |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function compare(ReflectionProperty $fromProperty, ReflectionProperty $toProperty) : Changes |
| 21 | 21 | { |
| 22 | - if (! $fromProperty->isPublic()) { |
|
| 22 | + if (!$fromProperty->isPublic()) { |
|
| 23 | 23 | return Changes::new(); |
| 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->compare( |
| 34 | 34 | $constantsFrom[$constantName], |
| 35 | 35 | $constantsTo[$constantName] |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | array_keys($this->accessibleProperties($toClass)) |
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | - return Changes::fromArray(array_values(array_map(function (string $property) use ($fromProperties) : Change { |
|
| 37 | + return Changes::fromArray(array_values(array_map(function(string $property) use ($fromProperties) : Change { |
|
| 38 | 38 | return Change::removed( |
| 39 | 39 | sprintf('Property %s was removed', $this->formatProperty->__invoke($fromProperties[$property])), |
| 40 | 40 | true |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | /** @return ReflectionProperty[] */ |
| 46 | 46 | private function accessibleProperties(ReflectionClass $class) : array |
| 47 | 47 | { |
| 48 | - return array_filter($class->getProperties(), function (ReflectionProperty $property) : bool { |
|
| 48 | + return array_filter($class->getProperties(), function(ReflectionProperty $property) : bool { |
|
| 49 | 49 | return $property->isPublic() || $property->isProtected(); |
| 50 | 50 | }); |
| 51 | 51 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | return Changes::new(); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if ($fromClass->isAbstract() || ! $toClass->isAbstract()) { |
|
| 26 | + if ($fromClass->isAbstract() || !$toClass->isAbstract()) { |
|
| 27 | 27 | return Changes::new(); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function compare(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
| 20 | 20 | { |
| 21 | - if ($fromClass->isTrait() || ! $toClass->isTrait()) { |
|
| 21 | + if ($fromClass->isTrait() || !$toClass->isTrait()) { |
|
| 22 | 22 | return Changes::new(); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -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->compare($fromClass, $toClass)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::new() |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | return Changes::new(); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - if (! $toClass->isFinal()) { |
|
| 20 | + if (!$toClass->isFinal()) { |
|
| 21 | 21 | return Changes::new(); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -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->compare( |
| 34 | 34 | $propertiesFrom[$propertyName], |
| 35 | 35 | $propertiesTo[$propertyName] |