@@ -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 | ); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | return array_combine( |
107 | 107 | array_keys($properties), |
108 | 108 | array_map( |
109 | - static function (string $className, array $errorMessages) use ($fromClassReflector, $toClassReflector |
|
109 | + static function(string $className, array $errorMessages) use ($fromClassReflector, $toClassReflector |
|
110 | 110 | ) : array { |
111 | 111 | return [ |
112 | 112 | $fromClassReflector->reflect($className), |
@@ -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 | ); |
@@ -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 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | return array_combine( |
96 | 96 | array_keys($interfaces), |
97 | 97 | array_map( |
98 | - static function (string $interfaceName, array $errors) use ($fromReflector, $toReflector) : array { |
|
98 | + static function(string $interfaceName, array $errors) use ($fromReflector, $toReflector) : array { |
|
99 | 99 | return [ |
100 | 100 | $fromReflector->reflect($interfaceName), |
101 | 101 | $toReflector->reflect($interfaceName), |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | self::assertSame( |
39 | 39 | $expectedMessages, |
40 | - array_map(static function (Change $change) : string { |
|
40 | + array_map(static function(Change $change) : string { |
|
41 | 41 | return $change->__toString(); |
42 | 42 | }, iterator_to_array($changes)) |
43 | 43 | ); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | return array_combine( |
124 | 124 | array_keys($properties), |
125 | 125 | array_map( |
126 | - static function (string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
126 | + static function(string $methodName, array $errorMessages) use ($fromClass, $toClass) : array { |
|
127 | 127 | return [ |
128 | 128 | $fromClass->getMethod($methodName), |
129 | 129 | $toClass->getMethod($methodName), |
@@ -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 $method, array $errorMessages) use ($fromClass, $toClass) : array { |
|
111 | + static function(string $method, array $errorMessages) use ($fromClass, $toClass) : array { |
|
112 | 112 | return [ |
113 | 113 | $fromClass->getMethod($method), |
114 | 114 | $toClass->getMethod($method), |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | self::assertSame( |
39 | 39 | $expectedMessages, |
40 | - array_map(static function (Change $change) : string { |
|
40 | + array_map(static function(Change $change) : string { |
|
41 | 41 | return $change->__toString(); |
42 | 42 | }, iterator_to_array($changes)) |
43 | 43 | ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | return array_combine( |
122 | 122 | array_keys($properties), |
123 | 123 | array_map( |
124 | - static function (string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
124 | + static function(string $constant, array $errorMessages) use ($fromClass, $toClass) : array { |
|
125 | 125 | return [ |
126 | 126 | $fromClass->getReflectionConstant($constant), |
127 | 127 | $toClass->getReflectionConstant($constant), |
@@ -32,7 +32,7 @@ |
||
32 | 32 | ->getOutput(); |
33 | 33 | |
34 | 34 | return new VersionsCollection(...array_filter( |
35 | - array_map(static function (string $maybeVersion) : ?Version { |
|
35 | + array_map(static function(string $maybeVersion) : ?Version { |
|
36 | 36 | try { |
37 | 37 | return Version::fromString($maybeVersion); |
38 | 38 | } catch (InvalidVersionStringException $e) { |
@@ -31,21 +31,21 @@ discard block |
||
31 | 31 | $this->output->writeln( |
32 | 32 | "# Added\n" |
33 | 33 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
34 | - static function (Change $change) : bool { |
|
34 | + static function(Change $change) : bool { |
|
35 | 35 | return $change->isAdded(); |
36 | 36 | }, |
37 | 37 | ...$arrayOfChanges |
38 | 38 | )) |
39 | 39 | . "\n# Changed\n" |
40 | 40 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
41 | - static function (Change $change) : bool { |
|
41 | + static function(Change $change) : bool { |
|
42 | 42 | return $change->isChanged(); |
43 | 43 | }, |
44 | 44 | ...$arrayOfChanges |
45 | 45 | )) |
46 | 46 | . "\n# Removed\n" |
47 | 47 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
48 | - static function (Change $change) : bool { |
|
48 | + static function(Change $change) : bool { |
|
49 | 49 | return $change->isRemoved(); |
50 | 50 | }, |
51 | 51 | ...$arrayOfChanges |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | private function convertFilteredChangesToMarkdownBulletList(callable $filterFunction, Change ...$changes) : array |
58 | 58 | { |
59 | 59 | return array_map( |
60 | - static function (Change $change) : string { |
|
61 | - return ' - ' . str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim($change->__toString())) . "\n"; |
|
60 | + static function(Change $change) : string { |
|
61 | + return ' - '.str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim($change->__toString()))."\n"; |
|
62 | 62 | }, |
63 | 63 | array_filter($changes, $filterFunction) |
64 | 64 | ); |
@@ -45,13 +45,13 @@ |
||
45 | 45 | ClassReflector $newSourcesWithDependencies |
46 | 46 | ) : Changes { |
47 | 47 | $definedApiClassNames = array_map( |
48 | - static function (ReflectionClass $class) : string { |
|
48 | + static function(ReflectionClass $class) : string { |
|
49 | 49 | return $class->getName(); |
50 | 50 | }, |
51 | 51 | array_filter( |
52 | 52 | $definedSymbols->getAllClasses(), |
53 | - static function (ReflectionClass $class) : bool { |
|
54 | - return ! $class->isAnonymous(); |
|
53 | + static function(ReflectionClass $class) : bool { |
|
54 | + return !$class->isAnonymous(); |
|
55 | 55 | } |
56 | 56 | ) |
57 | 57 | ); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $methods = $class->getMethods(); |
50 | 50 | |
51 | 51 | return array_combine( |
52 | - array_map(static function (ReflectionMethod $method) : string { |
|
52 | + array_map(static function(ReflectionMethod $method) : string { |
|
53 | 53 | return strtolower($method->getName()); |
54 | 54 | }, $methods), |
55 | 55 | $methods |