Passed
Pull Request — master (#35)
by James
02:02
created
test/asset/api/new/ClassWithConstantsBeingRemoved.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 RoaveTestAsset;
5 5
 
Please login to merge, or discard this patch.
test/asset/api/new/ClassWithConstantValuesBeingChanged.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 RoaveTestAsset;
5 5
 
Please login to merge, or discard this patch.
test/asset/api/new/ClassWithConstantVisibilitiesBeingChanged.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 RoaveTestAsset;
5 5
 
Please login to merge, or discard this patch.
test/asset/api/old/ClassWithConstantsBeingRemoved.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 RoaveTestAsset;
5 5
 
Please login to merge, or discard this patch.
test/asset/api/old/ClassWithConstantValuesBeingChanged.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 RoaveTestAsset;
5 5
 
Please login to merge, or discard this patch.
test/asset/api/old/ClassWithConstantVisibilitiesBeingChanged.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 RoaveTestAsset;
5 5
 
Please login to merge, or discard this patch.
src/Comparator/BackwardsCompatibility/ClassBased/ConstantRemoved.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             $this->accessibleConstants($toClass)
22 22
         );
23 23
 
24
-        return Changes::fromArray(array_values(array_map(function (ReflectionClassConstant $constant) use ($fromClass) : Change {
24
+        return Changes::fromArray(array_values(array_map(function(ReflectionClassConstant $constant) use ($fromClass) : Change {
25 25
             return Change::removed(
26 26
                 sprintf('Constant %s::%s was removed', $fromClass->getName(), $constant->getName()),
27 27
                 true
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     /** @return ReflectionClassConstant[] */
33 33
     private function accessibleConstants(ReflectionClass $class) : array
34 34
     {
35
-        return array_filter($class->getReflectionConstants(), function (ReflectionClassConstant $constant) : bool {
35
+        return array_filter($class->getReflectionConstants(), function(ReflectionClassConstant $constant) : bool {
36 36
             return $constant->isPublic() || $constant->isProtected();
37 37
         });
38 38
     }
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 (string $propertyName, array $visibilities) use (
45
+        return Changes::fromArray(array_values(array_map(function(string $propertyName, array $visibilities) use (
46 46
             $fromClass
47 47
         ) : Change {
48 48
             return Change::changed(
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /** @return string[] indexed by constant name */
62 62
     private function constantVisibilities(ReflectionClass $class) : array
63 63
     {
64
-        return array_map(function (ReflectionClassConstant $constant) : string {
64
+        return array_map(function(ReflectionClassConstant $constant) : string {
65 65
             if ($constant->isPublic()) {
66 66
                 return self::VISIBILITY_PUBLIC;
67 67
             }
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,13 +19,13 @@  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 ($constantValue, string $constantName) use (
22
+        $changedConstants = array_keys(array_filter($fromValues, function($constantValue, string $constantName) use (
23 23
             $toValues
24 24
         ) : bool {
25 25
             return array_key_exists($constantName, $toValues) && $constantValue !== $toValues[$constantName];
26 26
         }, \ARRAY_FILTER_USE_BOTH));
27 27
 
28
-        return Changes::fromArray(array_values(array_map(function (string $constantName) use ($fromClass) : Change {
28
+        return Changes::fromArray(array_values(array_map(function(string $constantName) use ($fromClass) : Change {
29 29
             return Change::changed(
30 30
                 sprintf('Value of constant %s::%s changed', $fromClass->getName(), $constantName),
31 31
                 true
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $accessibleConstants = array_filter(
40 40
             $class->getReflectionConstants(),
41
-            function (ReflectionClassConstant $constant) : bool {
41
+            function(ReflectionClassConstant $constant) : bool {
42 42
                 return $constant->isPublic() || $constant->isProtected();
43 43
             }
44 44
         );
45 45
 
46
-        return array_map(function (ReflectionClassConstant $constant) {
46
+        return array_map(function(ReflectionClassConstant $constant) {
47 47
             return $constant->getValue();
48 48
         }, $accessibleConstants);
49 49
     }
Please login to merge, or discard this patch.