@@ -51,7 +51,7 @@ |
||
51 | 51 | private function generateTemporaryPathFor(Revision $revision) : string |
52 | 52 | { |
53 | 53 | $uniquePathGenerator = $this->uniquenessFunction; |
54 | - $checkoutDirectory = sys_get_temp_dir() . '/api-compare-' . $uniquePathGenerator($revision . '_'); |
|
54 | + $checkoutDirectory = sys_get_temp_dir().'/api-compare-'.$uniquePathGenerator($revision.'_'); |
|
55 | 55 | |
56 | 56 | if (file_exists($checkoutDirectory)) { |
57 | 57 | throw new RuntimeException(sprintf( |
@@ -30,21 +30,21 @@ discard block |
||
30 | 30 | $this->output->writeln( |
31 | 31 | "# Added\n" |
32 | 32 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
33 | - function (Change $change) : bool { |
|
33 | + function(Change $change) : bool { |
|
34 | 34 | return $change->isAdded(); |
35 | 35 | }, |
36 | 36 | ...$arrayOfChanges |
37 | 37 | )) |
38 | 38 | . "\n# Changed\n" |
39 | 39 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
40 | - function (Change $change) : bool { |
|
40 | + function(Change $change) : bool { |
|
41 | 41 | return $change->isChanged(); |
42 | 42 | }, |
43 | 43 | ...$arrayOfChanges |
44 | 44 | )) |
45 | 45 | . "\n# Removed\n" |
46 | 46 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
47 | - function (Change $change) : bool { |
|
47 | + function(Change $change) : bool { |
|
48 | 48 | return $change->isRemoved(); |
49 | 49 | }, |
50 | 50 | ...$arrayOfChanges |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | private function convertFilteredChangesToMarkdownBulletList(callable $filterFunction, Change ...$changes) : array |
57 | 57 | { |
58 | 58 | return array_map( |
59 | - function (Change $change) : string { |
|
60 | - return ' - ' . str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim($change->__toString())) . "\n"; |
|
59 | + function(Change $change) : string { |
|
60 | + return ' - '.str_replace(['ADDED: ', 'CHANGED: ', 'REMOVED: '], '', trim($change->__toString()))."\n"; |
|
61 | 61 | }, |
62 | 62 | array_filter($changes, $filterFunction) |
63 | 63 | ); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | array_diff($fromClass->getInterfaceNames(), $toClass->getInterfaceNames()) |
24 | 24 | ); |
25 | 25 | |
26 | - if (! $removedAncestors) { |
|
26 | + if (!$removedAncestors) { |
|
27 | 27 | return Changes::empty(); |
28 | 28 | } |
29 | 29 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | array_diff($fromClass->getInterfaceNames(), $toClass->getInterfaceNames()) |
26 | 26 | ); |
27 | 27 | |
28 | - if (! $removedAncestors) { |
|
28 | + if (!$removedAncestors) { |
|
29 | 29 | return Changes::empty(); |
30 | 30 | } |
31 | 31 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | self::assertSame( |
38 | 38 | $expectedMessages, |
39 | - array_map(function (Change $change) : string { |
|
39 | + array_map(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 | - function (string $interfaceName, array $errors) use ($fromReflector, $toReflector) : array { |
|
98 | + function(string $interfaceName, array $errors) use ($fromReflector, $toReflector) : array { |
|
99 | 99 | return [ |
100 | 100 | $fromReflector->reflect($interfaceName), |
101 | 101 | $toReflector->reflect($interfaceName), |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | self::assertSame( |
35 | 35 | $expectedMessages, |
36 | - array_map(function (Change $change) : string { |
|
36 | + array_map(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 | - function (string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
105 | + function(string $className, array $errors) use ($fromReflector, $toReflector) : array { |
|
106 | 106 | return [ |
107 | 107 | $fromReflector->reflect($className), |
108 | 108 | $toReflector->reflect($className), |