Passed
Pull Request — master (#35)
by James
02:02
created
src/Git/PickVersionFromVersionCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Roave\ApiCompare\Git;
5 5
 
Please login to merge, or discard this patch.
src/Git/PickLastMinorVersionFromCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Roave\ApiCompare\Git;
5 5
 
Please login to merge, or discard this patch.
src/Git/ParseRevision.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Roave\ApiCompare\Git;
5 5
 
Please login to merge, or discard this patch.
src/Git/GetVersionCollectionFromGitRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         ));
Please login to merge, or discard this patch.
src/Git/GitParseRevision.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/Git/GetVersionCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Roave\ApiCompare\Git;
5 5
 
Please login to merge, or discard this patch.
test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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))
Please login to merge, or discard this patch.
test/unit/Git/GitParseRevisionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
test/unit/Git/PickLastMinorVersionFromCollectionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace RoaveTest\ApiCompare\Git;
5 5
 
Please login to merge, or discard this patch.