Completed
Push — master ( 7bfa93...a33dc3 )
by Marco
10s
created
test/unit/Git/CheckedOutRepositoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace RoaveTest\ApiCompare\Git;
6 6
 
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
test/unit/Git/GetVersionCollectionFromGitRepositoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace RoaveTest\ApiCompare\Git;
6 6
 
@@ -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);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
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))
Please login to merge, or discard this patch.
test/unit/ChangeTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace RoaveTest\ApiCompare;
6 6
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $changeText = uniqid('changeText', true);
19 19
         self::assertSame(
20
-            '     ADDED: ' . $changeText,
20
+            '     ADDED: '.$changeText,
21 21
             (string) Change::added($changeText, false)
22 22
         );
23 23
     }
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $changeText = uniqid('changeText', true);
28 28
         self::assertSame(
29
-            '[BC] ADDED: ' . $changeText,
29
+            '[BC] ADDED: '.$changeText,
30 30
             (string) Change::added($changeText, true)
31 31
         );
32 32
     }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $changeText = uniqid('changeText', true);
37 37
         self::assertSame(
38
-            '     CHANGED: ' . $changeText,
38
+            '     CHANGED: '.$changeText,
39 39
             (string) Change::changed($changeText, false)
40 40
         );
41 41
     }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $changeText = uniqid('changeText', true);
46 46
         self::assertSame(
47
-            '[BC] CHANGED: ' . $changeText,
47
+            '[BC] CHANGED: '.$changeText,
48 48
             (string) Change::changed($changeText, true)
49 49
         );
50 50
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $changeText = uniqid('changeText', true);
55 55
         self::assertSame(
56
-            '     REMOVED: ' . $changeText,
56
+            '     REMOVED: '.$changeText,
57 57
             (string) Change::removed($changeText, false)
58 58
         );
59 59
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $changeText = uniqid('changeText', true);
64 64
         self::assertSame(
65
-            '[BC] REMOVED: ' . $changeText,
65
+            '[BC] REMOVED: '.$changeText,
66 66
             (string) Change::removed($changeText, true)
67 67
         );
68 68
     }
Please login to merge, or discard this patch.
Comparator/BackwardsCompatibility/ClassBased/ConstantVisibilityReduced.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Roave\ApiCompare\Comparator\BackwardsCompatibility\ClassBased;
6 6
 
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
             array_combine(
31 31
                 $sharedKeys,
32 32
                 array_map(
33
-                    function (string $propertyName) use ($visibilitiesFrom, $visibilitiesTo) : array {
33
+                    function(string $propertyName) use ($visibilitiesFrom, $visibilitiesTo) : array {
34 34
                         return [$visibilitiesFrom[$propertyName], $visibilitiesTo[$propertyName]];
35 35
                     },
36 36
                     $sharedKeys
37 37
                 )
38 38
             ),
39
-            function (array $visibilities) : bool {
39
+            function(array $visibilities) : bool {
40 40
                 // Note: works because public, protected and private are (luckily) sortable
41 41
                 return $visibilities[0] > $visibilities[1];
42 42
             }
43 43
         );
44 44
 
45
-        return Changes::fromArray(array_values(array_map(function (
45
+        return Changes::fromArray(array_values(array_map(function(
46 46
             string $propertyName,
47 47
             array $visibilities
48 48
         ) use (
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     /** @return string[] indexed by constant name */
65 65
     private function constantVisibilities(ReflectionClass $class) : array
66 66
     {
67
-        return array_map(function (ReflectionClassConstant $constant) : string {
67
+        return array_map(function(ReflectionClassConstant $constant) : string {
68 68
             if ($constant->isPublic()) {
69 69
                 return self::VISIBILITY_PUBLIC;
70 70
             }
Please login to merge, or discard this patch.
src/Comparator/BackwardsCompatibility/ClassBased/ConstantValueChanged.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Roave\ApiCompare\Comparator\BackwardsCompatibility\ClassBased;
6 6
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         $fromValues = $this->accessibleConstantValues($fromClass);
20 20
         $toValues   = $this->accessibleConstantValues($toClass);
21 21
 
22
-        $changedConstants = array_keys(array_filter($fromValues, function (
22
+        $changedConstants = array_keys(array_filter($fromValues, function(
23 23
             $constantValue,
24 24
             string $constantName
25 25
         ) use (
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             return array_key_exists($constantName, $toValues) && $constantValue !== $toValues[$constantName];
29 29
         }, \ARRAY_FILTER_USE_BOTH));
30 30
 
31
-        return Changes::fromArray(array_values(array_map(function (string $constantName) use ($fromClass) : Change {
31
+        return Changes::fromArray(array_values(array_map(function(string $constantName) use ($fromClass) : Change {
32 32
             return Change::changed(
33 33
                 sprintf('Value of constant %s::%s changed', $fromClass->getName(), $constantName),
34 34
                 true
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $accessibleConstants = array_filter(
43 43
             $class->getReflectionConstants(),
44
-            function (ReflectionClassConstant $constant) : bool {
44
+            function(ReflectionClassConstant $constant) : bool {
45 45
                 return $constant->isPublic() || $constant->isProtected();
46 46
             }
47 47
         );
48 48
 
49
-        return array_map(function (ReflectionClassConstant $constant) {
49
+        return array_map(function(ReflectionClassConstant $constant) {
50 50
             return $constant->getValue();
51 51
         }, $accessibleConstants);
52 52
     }
Please login to merge, or discard this patch.