@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $expectedRevision, |
| 33 | 33 | (new GitParseRevision())->fromStringForRepository( |
| 34 | 34 | $revisionToBeParsed, |
| 35 | - CheckedOutRepository::fromPath(__DIR__ . '/../../../') |
|
| 35 | + CheckedOutRepository::fromPath(__DIR__.'/../../../') |
|
| 36 | 36 | )->__toString() |
| 37 | 37 | ); |
| 38 | 38 | } |
@@ -18,14 +18,14 @@ |
||
| 18 | 18 | { |
| 19 | 19 | public function testFromPath() : void |
| 20 | 20 | { |
| 21 | - $path = sys_get_temp_dir() . '/' . uniqid('testPath', true); |
|
| 21 | + $path = sys_get_temp_dir().'/'.uniqid('testPath', true); |
|
| 22 | 22 | mkdir($path, 0777, true); |
| 23 | - mkdir($path . '/.git'); |
|
| 23 | + mkdir($path.'/.git'); |
|
| 24 | 24 | |
| 25 | 25 | $checkedOutRepository = CheckedOutRepository::fromPath($path); |
| 26 | 26 | self::assertSame($path, (string) $checkedOutRepository); |
| 27 | 27 | |
| 28 | - rmdir($path . '/.git'); |
|
| 28 | + rmdir($path.'/.git'); |
|
| 29 | 29 | rmdir($path); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | public function testCheckoutAndRemove() : void |
| 19 | 19 | { |
| 20 | - $sourceRepositoryPath = realpath(__DIR__ . '/../../../'); |
|
| 20 | + $sourceRepositoryPath = realpath(__DIR__.'/../../../'); |
|
| 21 | 21 | |
| 22 | 22 | $git = new GitCheckoutRevisionToTemporaryPath(); |
| 23 | 23 | |
@@ -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); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | self::assertSame( |
| 53 | 53 | ['1.0.0'], |
| 54 | 54 | array_map( |
| 55 | - function (Version $version) { |
|
| 55 | + function(Version $version) { |
|
| 56 | 56 | return $version->getVersionString(); |
| 57 | 57 | }, |
| 58 | 58 | iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath)) |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | self::assertSame( |
| 33 | 33 | $expectedMessages, |
| 34 | - array_map(function (Change $change) : string { |
|
| 34 | + array_map(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 | [ |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | self::assertSame( |
| 31 | 31 | $expectedMessages, |
| 32 | - array_map(function (Change $change) : string { |
|
| 32 | + array_map(function(Change $change) : string { |
|
| 33 | 33 | return $change->__toString(); |
| 34 | 34 | }, iterator_to_array($changes)) |
| 35 | 35 | ); |
@@ -43,11 +43,11 @@ discard block |
||
| 43 | 43 | return [ |
| 44 | 44 | 'RoaveTestAsset\\ClassWithConstantsBeingRemoved' => [ |
| 45 | 45 | (new ClassReflector(new SingleFileSourceLocator( |
| 46 | - __DIR__ . '/../../../../asset/api/old/ClassWithConstantsBeingRemoved.php', |
|
| 46 | + __DIR__.'/../../../../asset/api/old/ClassWithConstantsBeingRemoved.php', |
|
| 47 | 47 | $locator |
| 48 | 48 | )))->reflect('RoaveTestAsset\\ClassWithConstantsBeingRemoved'), |
| 49 | 49 | (new ClassReflector(new SingleFileSourceLocator( |
| 50 | - __DIR__ . '/../../../../asset/api/new/ClassWithConstantsBeingRemoved.php', |
|
| 50 | + __DIR__.'/../../../../asset/api/new/ClassWithConstantsBeingRemoved.php', |
|
| 51 | 51 | $locator |
| 52 | 52 | )))->reflect('RoaveTestAsset\\ClassWithConstantsBeingRemoved'), |
| 53 | 53 | [ |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | self::assertSame( |
| 33 | 33 | $expectedMessages, |
| 34 | - array_map(function (Change $change) : string { |
|
| 34 | + array_map(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 | [ |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function checkout(CheckedOutRepository $sourceRepository, Revision $revision) : CheckedOutRepository |
| 18 | 18 | { |
| 19 | - $checkoutDirectory = sys_get_temp_dir() . '/api-compare-' . (string) $revision; |
|
| 19 | + $checkoutDirectory = sys_get_temp_dir().'/api-compare-'.(string) $revision; |
|
| 20 | 20 | |
| 21 | 21 | (new Process(['git', 'clone', (string) $sourceRepository, $checkoutDirectory]))->mustRun(); |
| 22 | 22 | (new Process(['git', 'checkout', (string) $revision]))->setWorkingDirectory($checkoutDirectory)->mustRun(); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | // @todo handle invalid versions more gracefully (drop them) |
| 32 | 32 | return VersionsCollection::fromArray(array_filter( |
| 33 | 33 | explode("\n", $output), |
| 34 | - function (string $maybeVersion) { |
|
| 34 | + function(string $maybeVersion) { |
|
| 35 | 35 | return trim($maybeVersion) !== ''; |
| 36 | 36 | } |
| 37 | 37 | )); |