@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Roave\ApiCompareCli; |
| 6 | 6 | |
@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | use Symfony\Component\Console\Application; |
| 10 | 10 | use function file_exists; |
| 11 | 11 | |
| 12 | -(function () { |
|
| 13 | - foreach ([__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../autoload.php'] as $autoload) { |
|
| 14 | - if (! file_exists($autoload)) { |
|
| 12 | +(function() { |
|
| 13 | + foreach ([__DIR__.'/../vendor/autoload.php', __DIR__.'/../autoload.php'] as $autoload) { |
|
| 14 | + if (!file_exists($autoload)) { |
|
| 15 | 15 | continue; |
| 16 | 16 | } |
| 17 | 17 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 5 | 5 | |
@@ -17,14 +17,14 @@ discard block |
||
| 17 | 17 | public function fromRepository(CheckedOutRepository $checkedOutRepository) : VersionsCollection |
| 18 | 18 | { |
| 19 | 19 | $output = (new Process(['git', 'tag', '-l'])) |
| 20 | - ->setWorkingDirectory((string)$checkedOutRepository) |
|
| 20 | + ->setWorkingDirectory((string) $checkedOutRepository) |
|
| 21 | 21 | ->mustRun() |
| 22 | 22 | ->getOutput(); |
| 23 | 23 | |
| 24 | 24 | // @todo handle invalid versions more gracefully (drop them) |
| 25 | 25 | return VersionsCollection::fromArray(array_filter( |
| 26 | 26 | explode("\n", $output), |
| 27 | - function (string $maybeVersion) { |
|
| 27 | + function(string $maybeVersion) { |
|
| 28 | 28 | return trim($maybeVersion) !== ''; |
| 29 | 29 | } |
| 30 | 30 | )); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 5 | 5 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | return Revision::fromSha1( |
| 17 | 17 | (new Process(['git', 'rev-parse', $something])) |
| 18 | - ->setWorkingDirectory((string)$repository) |
|
| 18 | + ->setWorkingDirectory((string) $repository) |
|
| 19 | 19 | ->mustRun() |
| 20 | 20 | ->getOutput() |
| 21 | 21 | ); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Roave\ApiCompare\Git; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace RoaveTest\ApiCompare\Git; |
| 5 | 5 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function setUp() : void |
| 21 | 21 | { |
| 22 | - $tmpGitRepo = sys_get_temp_dir() . '/api-compare-' . uniqid('tmpGitRepo', true); |
|
| 22 | + $tmpGitRepo = sys_get_temp_dir().'/api-compare-'.uniqid('tmpGitRepo', true); |
|
| 23 | 23 | mkdir($tmpGitRepo, 0777, true); |
| 24 | 24 | (new Process(['git', 'init']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
| 25 | - file_put_contents($tmpGitRepo . '/test', uniqid('testContent', true)); |
|
| 25 | + file_put_contents($tmpGitRepo.'/test', uniqid('testContent', true)); |
|
| 26 | 26 | (new Process(['git', 'add', '.']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
| 27 | 27 | (new Process(['git', 'commit', '-m', '"whatever"']))->setWorkingDirectory($tmpGitRepo)->mustRun(); |
| 28 | 28 | $this->repoPath = CheckedOutRepository::fromPath($tmpGitRepo); |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function tearDown() : void |
| 32 | 32 | { |
| 33 | - (new Process(['rm', '-Rf', (string)$this->repoPath]))->mustRun(); |
|
| 33 | + (new Process(['rm', '-Rf', (string) $this->repoPath]))->mustRun(); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | private function makeTag(string $tagName) : void |
| 37 | 37 | { |
| 38 | - (new Process(['git', 'tag', $tagName]))->setWorkingDirectory((string)$this->repoPath)->mustRun(); |
|
| 38 | + (new Process(['git', 'tag', $tagName]))->setWorkingDirectory((string) $this->repoPath)->mustRun(); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | public function testFromRepository() : void |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | '1.0.0', |
| 48 | 48 | ], |
| 49 | 49 | array_map( |
| 50 | - function (Version $version) { |
|
| 50 | + function(Version $version) { |
|
| 51 | 51 | return $version->getVersionString(); |
| 52 | 52 | }, |
| 53 | 53 | iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath)) |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace RoaveTest\ApiCompare\Git; |
| 5 | 5 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $expectedRevision, |
| 31 | 31 | (new GitParseRevision())->fromStringForRepository( |
| 32 | 32 | $revisionToBeParsed, |
| 33 | - CheckedOutRepository::fromPath(__DIR__ . '/../../../') |
|
| 33 | + CheckedOutRepository::fromPath(__DIR__.'/../../../') |
|
| 34 | 34 | )->__toString() |
| 35 | 35 | ); |
| 36 | 36 | } |