@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | array_change_key_case($this->accessibleMethods($toClass), CASE_UPPER) |
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | - return Changes::fromArray(array_values(array_map(function (ReflectionMethod $method) : Change { |
|
| 38 | + return Changes::fromArray(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 compare(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::new(); |
| 24 | 24 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function compare(ReflectionClass $fromClass, ReflectionClass $toClass) : Changes |
| 21 | 21 | { |
| 22 | - if (! $fromClass->isFinal()) { |
|
| 22 | + if (!$fromClass->isFinal()) { |
|
| 23 | 23 | return Changes::new(); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function compare(ReflectionMethod $fromMethod, ReflectionMethod $toMethod) : Changes |
| 24 | 24 | { |
| 25 | - if (! $fromMethod->isPublic()) { |
|
| 25 | + if (!$fromMethod->isPublic()) { |
|
| 26 | 26 | return Changes::new(); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | return array_reduce( |
| 24 | 24 | $this->checks, |
| 25 | - function (Changes $changes, MethodBased $check) use ($fromMethod, $toMethod) : Changes { |
|
| 25 | + function(Changes $changes, MethodBased $check) use ($fromMethod, $toMethod) : Changes { |
|
| 26 | 26 | return $changes->mergeWith($check->compare($fromMethod, $toMethod)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::new() |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | public function compare(ReflectionMethod $fromMethod, ReflectionMethod $toMethod) : Changes |
| 19 | 19 | { |
| 20 | - if ($fromMethod->isFinal() || ! $toMethod->isFinal()) { |
|
| 20 | + if ($fromMethod->isFinal() || !$toMethod->isFinal()) { |
|
| 21 | 21 | return Changes::new(); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | public function compare(ReflectionMethod $fromMethod, ReflectionMethod $toMethod) : Changes |
| 19 | 19 | { |
| 20 | - if ($fromMethod->isAbstract() || ! $toMethod->isAbstract()) { |
|
| 20 | + if ($fromMethod->isAbstract() || !$toMethod->isAbstract()) { |
|
| 21 | 21 | return Changes::new(); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function compare(ReflectionMethod $fromMethod, ReflectionMethod $toMethod) : Changes |
| 24 | 24 | { |
| 25 | - if (! $fromMethod->isProtected()) { |
|
| 25 | + if (!$fromMethod->isProtected()) { |
|
| 26 | 26 | return Changes::new(); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | public function __invoke(ReflectionProperty $property) : string |
| 12 | 12 | { |
| 13 | 13 | if ($property->isStatic()) { |
| 14 | - return $property->getDeclaringClass()->getName() . '::$' . $property->getName(); |
|
| 14 | + return $property->getDeclaringClass()->getName().'::$'.$property->getName(); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | - return $property->getDeclaringClass()->getName() . '#$' . $property->getName(); |
|
| 17 | + return $property->getDeclaringClass()->getName().'#$'.$property->getName(); |
|
| 18 | 18 | } |
| 19 | 19 | } |