@@ -61,7 +61,7 @@ |
||
61 | 61 | $comparator |
62 | 62 | ->expects(self::exactly(2)) |
63 | 63 | ->method('__invoke') |
64 | - ->willReturnCallback(static function (ReflectionProperty $from, ReflectionProperty $to) : Changes { |
|
64 | + ->willReturnCallback(static function(ReflectionProperty $from, ReflectionProperty $to) : Changes { |
|
65 | 65 | $propertyName = $from->getName(); |
66 | 66 | |
67 | 67 | self::assertSame($propertyName, $to->getName()); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | self::assertSame( |
33 | 33 | $expectedMessages, |
34 | - array_map(static function (Change $change) : string { |
|
34 | + array_map(static function(Change $change) : string { |
|
35 | 35 | return $change->__toString(); |
36 | 36 | }, iterator_to_array($changes)) |
37 | 37 | ); |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | return [ |
46 | 46 | 'RoaveTestAsset\\ClassWithConstantsBeingRemoved' => [ |
47 | 47 | (new ClassReflector(new SingleFileSourceLocator( |
48 | - __DIR__ . '/../../../../asset/api/old/ClassWithConstantsBeingRemoved.php', |
|
48 | + __DIR__.'/../../../../asset/api/old/ClassWithConstantsBeingRemoved.php', |
|
49 | 49 | $locator |
50 | 50 | )))->reflect('RoaveTestAsset\\ClassWithConstantsBeingRemoved'), |
51 | 51 | (new ClassReflector(new SingleFileSourceLocator( |
52 | - __DIR__ . '/../../../../asset/api/new/ClassWithConstantsBeingRemoved.php', |
|
52 | + __DIR__.'/../../../../asset/api/new/ClassWithConstantsBeingRemoved.php', |
|
53 | 53 | $locator |
54 | 54 | )))->reflect('RoaveTestAsset\\ClassWithConstantsBeingRemoved'), |
55 | 55 | [ |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $comparator |
63 | 63 | ->expects(self::exactly(3)) |
64 | 64 | ->method('__invoke') |
65 | - ->willReturnCallback(static function (ReflectionMethod $from, ReflectionMethod $to) : Changes { |
|
65 | + ->willReturnCallback(static function(ReflectionMethod $from, ReflectionMethod $to) : Changes { |
|
66 | 66 | $methodName = $from->getName(); |
67 | 67 | |
68 | 68 | self::assertSame(strtolower($methodName), strtolower($to->getName())); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $comparator |
62 | 62 | ->expects(self::exactly(2)) |
63 | 63 | ->method('__invoke') |
64 | - ->willReturnCallback(static function (ReflectionClassConstant $from, ReflectionClassConstant $to) : Changes { |
|
64 | + ->willReturnCallback(static function(ReflectionClassConstant $from, ReflectionClassConstant $to) : Changes { |
|
65 | 65 | $propertyName = $from->getName(); |
66 | 66 | |
67 | 67 | self::assertSame($propertyName, $to->getName()); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | self::assertSame( |
33 | 33 | $expectedMessages, |
34 | - array_map(static function (Change $change) : string { |
|
34 | + array_map(static function(Change $change) : string { |
|
35 | 35 | return $change->__toString(); |
36 | 36 | }, iterator_to_array($changes)) |
37 | 37 | ); |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | return [ |
46 | 46 | 'RoaveTestAsset\\ClassWithMethodsBeingRemoved' => [ |
47 | 47 | (new ClassReflector(new SingleFileSourceLocator( |
48 | - __DIR__ . '/../../../../asset/api/old/ClassWithMethodsBeingRemoved.php', |
|
48 | + __DIR__.'/../../../../asset/api/old/ClassWithMethodsBeingRemoved.php', |
|
49 | 49 | $locator |
50 | 50 | )))->reflect('RoaveTestAsset\\ClassWithMethodsBeingRemoved'), |
51 | 51 | (new ClassReflector(new SingleFileSourceLocator( |
52 | - __DIR__ . '/../../../../asset/api/new/ClassWithMethodsBeingRemoved.php', |
|
52 | + __DIR__.'/../../../../asset/api/new/ClassWithMethodsBeingRemoved.php', |
|
53 | 53 | $locator |
54 | 54 | )))->reflect('RoaveTestAsset\\ClassWithMethodsBeingRemoved'), |
55 | 55 | [ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | self::assertSame( |
33 | 33 | $expectedMessages, |
34 | - array_map(static function (Change $change) : string { |
|
34 | + array_map(static function(Change $change) : string { |
|
35 | 35 | return $change->__toString(); |
36 | 36 | }, iterator_to_array($changes)) |
37 | 37 | ); |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | return [ |
46 | 46 | 'RoaveTestAsset\\ClassWithPropertiesBeingRemoved' => [ |
47 | 47 | (new ClassReflector(new SingleFileSourceLocator( |
48 | - __DIR__ . '/../../../../asset/api/old/ClassWithPropertiesBeingRemoved.php', |
|
48 | + __DIR__.'/../../../../asset/api/old/ClassWithPropertiesBeingRemoved.php', |
|
49 | 49 | $locator |
50 | 50 | )))->reflect('RoaveTestAsset\\ClassWithPropertiesBeingRemoved'), |
51 | 51 | (new ClassReflector(new SingleFileSourceLocator( |
52 | - __DIR__ . '/../../../../asset/api/new/ClassWithPropertiesBeingRemoved.php', |
|
52 | + __DIR__.'/../../../../asset/api/new/ClassWithPropertiesBeingRemoved.php', |
|
53 | 53 | $locator |
54 | 54 | )))->reflect('RoaveTestAsset\\ClassWithPropertiesBeingRemoved'), |
55 | 55 | [ |
@@ -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 | ); |
@@ -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 |