@@ -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(), static function (ReflectionMethod $method) : bool { |
|
49 | + $methods = array_filter($class->getMethods(), static function(ReflectionMethod $method) : bool { |
|
50 | 50 | return $method->isPublic() || $method->isProtected(); |
51 | 51 | }); |
52 | 52 | |
53 | 53 | return array_combine( |
54 | - array_map(static function (ReflectionMethod $method) : string { |
|
54 | + array_map(static function(ReflectionMethod $method) : string { |
|
55 | 55 | return $method->getName(); |
56 | 56 | }, $methods), |
57 | 57 | $methods |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | $toMethods = $this->methods($toInterface); |
24 | 24 | $newMethods = array_diff_key($toMethods, $fromMethods); |
25 | 25 | |
26 | - if (! $newMethods) { |
|
26 | + if (!$newMethods) { |
|
27 | 27 | return Changes::empty(); |
28 | 28 | } |
29 | 29 | |
30 | - return Changes::fromList(...array_values(array_map(static function (ReflectionMethod $method) use ( |
|
30 | + return Changes::fromList(...array_values(array_map(static function(ReflectionMethod $method) use ( |
|
31 | 31 | $fromInterface |
32 | 32 | ) : Change { |
33 | 33 | return Change::added( |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $methods = $interface->getMethods(); |
48 | 48 | |
49 | 49 | return array_combine( |
50 | - array_map(static function (ReflectionMethod $method) : string { |
|
50 | + array_map(static function(ReflectionMethod $method) : string { |
|
51 | 51 | return strtolower($method->getName()); |
52 | 52 | }, $methods), |
53 | 53 | $methods |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | use Symfony\Component\Console\Output\ConsoleOutput; |
33 | 33 | use function file_exists; |
34 | 34 | |
35 | -(static function () : void { |
|
36 | - (static function () : void { |
|
35 | +(static function() : void { |
|
36 | + (static function() : void { |
|
37 | 37 | $autoloaderLocations = [ |
38 | - __DIR__ . '/../vendor/autoload.php', // Installed by cloning the project and running `composer install` |
|
39 | - __DIR__ . '/../../../autoload.php', // Installed via `composer require` |
|
38 | + __DIR__.'/../vendor/autoload.php', // Installed by cloning the project and running `composer install` |
|
39 | + __DIR__.'/../../../autoload.php', // Installed via `composer require` |
|
40 | 40 | ]; |
41 | 41 | |
42 | 42 | foreach ($autoloaderLocations as $autoload) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | new GetVersionCollectionFromGitRepository(), |
66 | 66 | new PickLastMinorVersionFromCollection(), |
67 | 67 | new LocateDependenciesViaComposer( |
68 | - static function (string $installationPath) use ($composerIo) : Installer { |
|
68 | + static function(string $installationPath) use ($composerIo) : Installer { |
|
69 | 69 | return Installer::create( |
70 | 70 | $composerIo, |
71 | 71 | (new Factory())->createComposer( |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $reflector = new ClassReflector( |
31 | 31 | $this->locateSources |
32 | - ->__invoke(__DIR__ . '/../../asset/located-sources/composer-definition-with-everything') |
|
32 | + ->__invoke(__DIR__.'/../../asset/located-sources/composer-definition-with-everything') |
|
33 | 33 | ); |
34 | 34 | |
35 | 35 | self::assertSame( |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | self::assertSame( |
38 | 38 | $expectedMessages, |
39 | - array_map(static function (Change $change) : string { |
|
39 | + array_map(static function(Change $change) : string { |
|
40 | 40 | return $change->__toString(); |
41 | 41 | }, iterator_to_array($changes)) |
42 | 42 | ); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return array_combine( |
109 | 109 | array_keys($properties), |
110 | 110 | array_map( |
111 | - static function (string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
111 | + static function(string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
112 | 112 | return [ |
113 | 113 | $fromClass->getProperty($property), |
114 | 114 | $toClass->getProperty($property), |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | self::assertSame( |
38 | 38 | $expectedMessages, |
39 | - array_map(static function (Change $change) : string { |
|
39 | + array_map(static function(Change $change) : string { |
|
40 | 40 | return $change->__toString(); |
41 | 41 | }, iterator_to_array($changes)) |
42 | 42 | ); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return array_combine( |
109 | 109 | array_keys($properties), |
110 | 110 | array_map( |
111 | - static function (string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
111 | + static function(string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
112 | 112 | return [ |
113 | 113 | $fromClass->getProperty($property), |
114 | 114 | $toClass->getProperty($property), |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | self::assertSame( |
38 | 38 | $expectedMessages, |
39 | - array_map(static function (Change $change) : string { |
|
39 | + array_map(static function(Change $change) : string { |
|
40 | 40 | return $change->__toString(); |
41 | 41 | }, iterator_to_array($changes)) |
42 | 42 | ); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | return array_combine( |
109 | 109 | array_keys($properties), |
110 | 110 | array_map( |
111 | - static function (string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
111 | + static function(string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
112 | 112 | return [ |
113 | 113 | $fromClass->getProperty($property), |
114 | 114 | $toClass->getProperty($property), |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | self::assertSame( |
35 | 35 | $expectedMessages, |
36 | - array_map(static function (Change $change) : string { |
|
36 | + array_map(static function(Change $change) : string { |
|
37 | 37 | return $change->__toString(); |
38 | 38 | }, iterator_to_array($changes)) |
39 | 39 | ); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | , |
64 | 64 | $locator |
65 | 65 | )); |
66 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
66 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
67 | 67 | <<<'PHP' |
68 | 68 | <?php |
69 | 69 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return array_combine( |
103 | 103 | array_keys($classes), |
104 | 104 | array_map( |
105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
106 | 106 | return [ |
107 | 107 | $fromReflector->reflect($className), |
108 | 108 | $toReflector->reflect($className), |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | self::assertSame( |
35 | 35 | $expectedMessages, |
36 | - array_map(static function (Change $change) : string { |
|
36 | + array_map(static function(Change $change) : string { |
|
37 | 37 | return $change->__toString(); |
38 | 38 | }, iterator_to_array($changes)) |
39 | 39 | ); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | , |
64 | 64 | $locator |
65 | 65 | )); |
66 | - $toReflector = new ClassReflector(new StringSourceLocator( |
|
66 | + $toReflector = new ClassReflector(new StringSourceLocator( |
|
67 | 67 | <<<'PHP' |
68 | 68 | <?php |
69 | 69 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return array_combine( |
103 | 103 | array_keys($classes), |
104 | 104 | array_map( |
105 | - static function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
105 | + static function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
106 | 106 | return [ |
107 | 107 | $fromReflector->reflect($className), |
108 | 108 | $toReflector->reflect($className), |