@@ -161,23 +161,23 @@ |
||
| 161 | 161 | $toPath = $this->git->checkout($sourceRepo, $toRevision); |
| 162 | 162 | |
| 163 | 163 | try { |
| 164 | - $fromSources = $fromPath . '/' . $sourcesPath; |
|
| 165 | - $toSources = $toPath . '/' . $sourcesPath; |
|
| 164 | + $fromSources = $fromPath.'/'.$sourcesPath; |
|
| 165 | + $toSources = $toPath.'/'.$sourcesPath; |
|
| 166 | 166 | |
| 167 | 167 | Assert::that($fromSources)->directory(); |
| 168 | 168 | Assert::that($toSources)->directory(); |
| 169 | 169 | |
| 170 | 170 | $changes = ($this->compareApi)( |
| 171 | 171 | ($this->reflectorFactory)( |
| 172 | - $fromPath . '/' . $sourcesPath, |
|
| 172 | + $fromPath.'/'.$sourcesPath, |
|
| 173 | 173 | new AggregateSourceLocator() // no dependencies |
| 174 | 174 | ), |
| 175 | 175 | ($this->reflectorFactory)( |
| 176 | - $fromPath . '/' . $sourcesPath, |
|
| 176 | + $fromPath.'/'.$sourcesPath, |
|
| 177 | 177 | ($this->locateDependencies)((string) $fromPath) |
| 178 | 178 | ), |
| 179 | 179 | ($this->reflectorFactory)( |
| 180 | - $toPath . '/' . $sourcesPath, |
|
| 180 | + $toPath.'/'.$sourcesPath, |
|
| 181 | 181 | ($this->locateDependencies)((string) $toPath) |
| 182 | 182 | ) |
| 183 | 183 | ); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | return array_reduce( |
| 24 | 24 | $this->checks, |
| 25 | - function (Changes $changes, InterfaceBased $check) use ($fromClass, $toClass) : Changes { |
|
| 25 | + function(Changes $changes, InterfaceBased $check) use ($fromClass, $toClass) : Changes { |
|
| 26 | 26 | return $changes->mergeWith($check($fromClass, $toClass)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::empty() |
@@ -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)( |
| 34 | 34 | $constantsFrom[$constantName], |
| 35 | 35 | $constantsTo[$constantName] |
@@ -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)($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 |
@@ -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($fromClass, $toClass)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::empty() |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | array_keys($this->accessibleProperties($toClass)) |
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | - return Changes::fromList(...array_values(array_map(function (string $property) use ($fromProperties) : Change { |
|
| 37 | + return Changes::fromList(...array_values(array_map(function(string $property) use ($fromProperties) : Change { |
|
| 38 | 38 | return Change::removed( |
| 39 | 39 | sprintf('Property %s was removed', ($this->formatProperty)($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 | } |
@@ -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)( |
| 34 | 34 | $propertiesFrom[$propertyName], |
| 35 | 35 | $propertiesTo[$propertyName] |
@@ -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)( |
| 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 |
@@ -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($fromConstant, $toConstant)); |
| 27 | 27 | }, |
| 28 | 28 | Changes::empty() |