Passed
Pull Request — master (#59)
by Michael
02:42
created
src/Git/GetVersionCollectionFromGitRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             ->getOutput();
32 32
 
33 33
         return VersionsCollection::fromArray(array_filter(
34
-            array_map(function (string $maybeVersion) : ?Version {
34
+            array_map(function(string $maybeVersion) : ?Version {
35 35
                 try {
36 36
                     return Version::fromString($maybeVersion);
37 37
                 } catch (InvalidVersionStringException $e) {
Please login to merge, or discard this patch.
test/unit/Git/GitCheckoutRevisionToTemporaryPathTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         $revision = Revision::fromSha1(self::TEST_REVISION_TO_CHECKOUT);
24 24
 
25 25
         $temporaryClone = $git->checkout(
26
-            CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../')),
26
+            CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../')),
27 27
             $revision
28 28
         );
29 29
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function testCanCheckOutSameRevisionTwice() : void
36 36
     {
37 37
         $git              = new GitCheckoutRevisionToTemporaryPath();
38
-        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../'));
38
+        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../'));
39 39
         $revision         = Revision::fromSha1(self::TEST_REVISION_TO_CHECKOUT);
40 40
 
41 41
         $first  = $git->checkout($sourceRepository, $revision);
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function testExceptionIsThrownWhenTwoPathsCollide() : void
52 52
     {
53
-        $git              = new GitCheckoutRevisionToTemporaryPath(function () : string {
53
+        $git              = new GitCheckoutRevisionToTemporaryPath(function() : string {
54 54
             return 'foo';
55 55
         });
56
-        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__ . '/../../../'));
56
+        $sourceRepository = CheckedOutRepository::fromPath(realpath(__DIR__.'/../../../'));
57 57
         $revision         = Revision::fromSha1(self::TEST_REVISION_TO_CHECKOUT);
58 58
 
59 59
         $first = $git->checkout($sourceRepository, $revision);
Please login to merge, or discard this patch.
test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
49 49
     private function getTags() : array
50 50
     {
51 51
         return array_map(
52
-            function (Version $version) {
52
+            function(Version $version) {
53 53
                 return $version->getVersionString();
54 54
             },
55 55
             iterator_to_array((new GetVersionCollectionFromGitRepository())->fromRepository($this->repoPath))
Please login to merge, or discard this patch.
src/Git/GitCheckoutRevisionToTemporaryPath.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function __construct(?callable $uniquenessFunction = null)
22 22
     {
23
-        $this->uniquenessFunction = $uniquenessFunction ?? function (string $nonUniqueThing) : string {
23
+        $this->uniquenessFunction = $uniquenessFunction ?? function(string $nonUniqueThing) : string {
24 24
                 return uniqid($nonUniqueThing, true);
25 25
         };
26 26
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     private function generateTemporaryPathFor(Revision $revision) : string
55 55
     {
56 56
         $uniquePathGenerator = $this->uniquenessFunction;
57
-        $checkoutDirectory   = sys_get_temp_dir() . '/api-compare-' . $uniquePathGenerator((string) $revision . '_');
57
+        $checkoutDirectory   = sys_get_temp_dir().'/api-compare-'.$uniquePathGenerator((string) $revision.'_');
58 58
 
59 59
         if (file_exists($checkoutDirectory) || is_dir($checkoutDirectory)) {
60 60
             throw new RuntimeException(sprintf(
Please login to merge, or discard this patch.
src/Command/AssertBackwardsCompatible.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -161,23 +161,23 @@
 block discarded – undo
161 161
         $toPath   = $this->git->checkout($sourceRepo, $toRevision);
162 162
 
163 163
         try {
164
-            $fromSources = $fromPath . '/' . $sourcesPath;
165
-            $toSources   = $toPath . '/' . $sourcesPath;
164
+            $fromSources = $fromPath.'/'.$sourcesPath;
165
+            $toSources   = $toPath.'/'.$sourcesPath;
166 166
 
167 167
             Assert::that($fromSources)->directory();
168 168
             Assert::that($toSources)->directory();
169 169
 
170 170
             $changes = ($this->compareApi)(
171 171
                 ($this->reflectorFactory)(
172
-                    $fromPath . '/' . $sourcesPath,
172
+                    $fromPath.'/'.$sourcesPath,
173 173
                     new AggregateSourceLocator() // no dependencies
174 174
                 ),
175 175
                 ($this->reflectorFactory)(
176
-                    $fromPath . '/' . $sourcesPath,
176
+                    $fromPath.'/'.$sourcesPath,
177 177
                     ($this->locateDependencies)((string) $fromPath)
178 178
                 ),
179 179
                 ($this->reflectorFactory)(
180
-                    $toPath . '/' . $sourcesPath,
180
+                    $toPath.'/'.$sourcesPath,
181 181
                     ($this->locateDependencies)((string) $toPath)
182 182
                 )
183 183
             );
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/InterfaceBased/MultipleChecksOnAnInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         return array_reduce(
24 24
             $this->checks,
25
-            function (Changes $changes, InterfaceBased $check) use ($fromClass, $toClass) : Changes {
25
+            function(Changes $changes, InterfaceBased $check) use ($fromClass, $toClass) : Changes {
26 26
                 return $changes->mergeWith($check($fromClass, $toClass));
27 27
             },
28 28
             Changes::empty()
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/ClassBased/ConstantChanged.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
         return array_reduce(
31 31
             array_keys($commonConstants),
32
-            function (Changes $accumulator, string $constantName) use ($constantsFrom, $constantsTo) : Changes {
32
+            function(Changes $accumulator, string $constantName) use ($constantsFrom, $constantsTo) : Changes {
33 33
                 return $accumulator->mergeWith(($this->checkConstant)(
34 34
                     $constantsFrom[$constantName],
35 35
                     $constantsTo[$constantName]
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/ClassBased/MethodRemoved.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             array_change_key_case($this->accessibleMethods($toClass), CASE_UPPER)
36 36
         );
37 37
 
38
-        return Changes::fromList(...array_values(array_map(function (ReflectionMethod $method) : Change {
38
+        return Changes::fromList(...array_values(array_map(function(ReflectionMethod $method) : Change {
39 39
             return Change::removed(
40 40
                 sprintf('Method %s was removed', ($this->formatFunction)($method)),
41 41
                 true
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
     /** @return ReflectionMethod[] */
47 47
     private function accessibleMethods(ReflectionClass $class) : array
48 48
     {
49
-        $methods = array_filter($class->getMethods(), function (ReflectionMethod $method) : bool {
49
+        $methods = array_filter($class->getMethods(), function(ReflectionMethod $method) : bool {
50 50
             return $method->isPublic() || $method->isProtected();
51 51
         });
52 52
 
53 53
         return array_combine(
54
-            array_map(function (ReflectionMethod $method) : string {
54
+            array_map(function(ReflectionMethod $method) : string {
55 55
                 return $method->getName();
56 56
             }, $methods),
57 57
             $methods
Please login to merge, or discard this patch.
src/DetectChanges/BCBreak/ClassBased/MultipleChecksOnAClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         return array_reduce(
24 24
             $this->checks,
25
-            function (Changes $changes, ClassBased $check) use ($fromClass, $toClass) : Changes {
25
+            function(Changes $changes, ClassBased $check) use ($fromClass, $toClass) : Changes {
26 26
                 return $changes->mergeWith($check($fromClass, $toClass));
27 27
             },
28 28
             Changes::empty()
Please login to merge, or discard this patch.