@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | |
27 | 27 | public function setUp() : void |
28 | 28 | { |
29 | - $tmpGitRepo = sys_get_temp_dir() . '/api-compare-' . uniqid('tmpGitRepo', true); |
|
29 | + $tmpGitRepo = sys_get_temp_dir().'/api-compare-'.uniqid('tmpGitRepo', true); |
|
30 | 30 | mkdir($tmpGitRepo, 0777, true); |
31 | 31 | (new Process(['git', 'init']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
32 | - file_put_contents($tmpGitRepo . '/test', uniqid('testContent', true)); |
|
32 | + file_put_contents($tmpGitRepo.'/test', uniqid('testContent', true)); |
|
33 | 33 | (new Process(['git', 'add', '.']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
34 | 34 | (new Process(['git', 'commit', '-m', '"whatever"']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
35 | 35 | $this->repoPath = CheckedOutRepository::fromPath($tmpGitRepo); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | private function getTags() : array |
50 | 50 | { |
51 | 51 | return array_map( |
52 | - static function (Version $version) { |
|
52 | + static function(Version $version) { |
|
53 | 53 | return $version->getVersionString(); |
54 | 54 | }, |
55 | 55 | iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath)) |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function testExceptionIsThrownWhenTwoPathsCollide() : void |
50 | 50 | { |
51 | - $git = new GitCheckoutRevisionToTemporaryPath(static function () : string { |
|
51 | + $git = new GitCheckoutRevisionToTemporaryPath(static function() : string { |
|
52 | 52 | return 'foo'; |
53 | 53 | }); |
54 | 54 | $sourceRepository = $this->sourceRepository(); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | private function sourceRepository() : CheckedOutRepository |
78 | 78 | { |
79 | - $repositoryPath = realpath(__DIR__ . '/../../..'); |
|
79 | + $repositoryPath = realpath(__DIR__.'/../../..'); |
|
80 | 80 | |
81 | 81 | self::assertInternalType('string', $repositoryPath); |
82 | 82 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | self::assertSame( |
47 | 47 | $expectedVersion, |
48 | 48 | (new PickLastMinorVersionFromCollection())->forVersions( |
49 | - new VersionsCollection(...array_map(static function (string $version) : Version { |
|
49 | + new VersionsCollection(...array_map(static function(string $version) : Version { |
|
50 | 50 | return Version::fromString($version); |
51 | 51 | }, $collectionOfVersions)) |
52 | 52 | )->getVersionString() |
@@ -63,7 +63,7 @@ |
||
63 | 63 | return array_combine( |
64 | 64 | array_keys($properties), |
65 | 65 | array_map( |
66 | - static function (string $expectedMessage, ReflectionProperty $property) : array { |
|
66 | + static function(string $expectedMessage, ReflectionProperty $property) : array { |
|
67 | 67 | return [$property, $expectedMessage]; |
68 | 68 | }, |
69 | 69 | array_keys($properties), |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | $output->expects(self::any()) |
38 | 38 | ->method('writeln') |
39 | - ->willReturnCallback(static function (string $output) use ($changeToExpect) : void { |
|
39 | + ->willReturnCallback(static function(string $output) use ($changeToExpect) : void { |
|
40 | 40 | self::assertContains($changeToExpect, $output); |
41 | 41 | }); |
42 | 42 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function testFromIteratorBuffersAllChangesWithoutLoadingThemEagerly() : void |
49 | 49 | { |
50 | 50 | $producedValues = 0; |
51 | - $changesProvider = static function () use (& $producedValues) { |
|
51 | + $changesProvider = static function() use (& $producedValues) { |
|
52 | 52 | $producedValues += 1; |
53 | 53 | |
54 | 54 | yield Change::changed('a', true); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | ->astLocator |
75 | 75 | ->expects(self::once()) |
76 | 76 | ->method('findReflection') |
77 | - ->with($this->reflector, self::callback(static function (LocatedSource $source) : bool { |
|
77 | + ->with($this->reflector, self::callback(static function(LocatedSource $source) : bool { |
|
78 | 78 | self::assertSame(file_get_contents(__FILE__), $source->getSource()); |
79 | 79 | self::assertSame(__FILE__, $source->getFileName()); |
80 | 80 | self::assertNull($source->getExtensionName()); |
@@ -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 | ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | return array_combine( |
123 | 123 | array_keys($properties), |
124 | 124 | array_map( |
125 | - static function (string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
125 | + static function(string $property, array $errorMessages) use ($fromClass, $toClass) : array { |
|
126 | 126 | return [ |
127 | 127 | $fromClass->getProperty($property), |
128 | 128 | $toClass->getProperty($property), |