Passed
Pull Request — master (#38)
by Marco
02:48
created
unit/Comparator/BackwardsCompatibility/MethodBased/MultiMethodBasedTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Comparator\BackwardsCompatibility\MethodBased;
6 6
 
Please login to merge, or discard this patch.
src/Comparator/Variance/TypeIsCovariant.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 Roave\ApiCompare\Comparator\Variance;
6 6
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             return false;
33 33
         }
34 34
 
35
-        if ($comparedType->allowsNull() && ! $type->allowsNull()) {
35
+        if ($comparedType->allowsNull() && !$type->allowsNull()) {
36 36
             return false;
37 37
         }
38 38
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             return false;
49 49
         }
50 50
 
51
-        if (strtolower($typeAsString) === 'object' && ! $comparedType->isBuiltin()) {
51
+        if (strtolower($typeAsString) === 'object' && !$comparedType->isBuiltin()) {
52 52
             // `object` is not covariant to a defined class type
53 53
             return true;
54 54
         }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             return true;
59 59
         }
60 60
 
61
-        if (strtolower($typeAsString) === 'iterable' && ! $comparedType->isBuiltin()) {
61
+        if (strtolower($typeAsString) === 'iterable' && !$comparedType->isBuiltin()) {
62 62
             if ($comparedType->targetReflectionClass()->implementsInterface(\Traversable::class)) {
63 63
                 // `iterable` can be restricted via any `Iterator` implementation
64 64
                 return true;
Please login to merge, or discard this patch.
src/Comparator/BackwardsCompatibility/ClassConstantBased/ConstantBased.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\ClassConstantBased;
6 6
 
Please login to merge, or discard this patch.
Comparator/BackwardsCompatibility/ClassConstantBased/MultiConstantBased.php 1 patch
Spacing   +2 added lines, -2 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\ClassConstantBased;
6 6
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         return array_reduce(
23 23
             $this->checks,
24
-            function (Changes $changes, ConstantBased $check) use ($fromConstant, $toConstant) : Changes {
24
+            function(Changes $changes, ConstantBased $check) use ($fromConstant, $toConstant) : Changes {
25 25
                 return $changes->mergeWith($check->compare($fromConstant, $toConstant));
26 26
             },
27 27
             Changes::new()
Please login to merge, or discard this patch.
BackwardsCompatibility/FunctionBased/ParameterTypeContravarianceChanged.php 1 patch
Spacing   +2 added lines, -2 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\FunctionBased;
6 6
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     private function typeToString(?ReflectionType $type) : string
80 80
     {
81
-        if (! $type) {
81
+        if (!$type) {
82 82
             return 'no type';
83 83
         }
84 84
 
Please login to merge, or discard this patch.
BackwardsCompatibility/FunctionBased/RequiredParameterAmountIncreased.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\FunctionBased;
6 6
 
Please login to merge, or discard this patch.
BackwardsCompatibility/FunctionBased/ParameterDefaultValueChanged.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\FunctionBased;
6 6
 
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $optionalParameters = array_values(array_filter(
58 58
             $function->getParameters(),
59
-            function (ReflectionParameter $parameter) : bool {
59
+            function(ReflectionParameter $parameter) : bool {
60 60
                 return $parameter->isDefaultValueAvailable();
61 61
             }
62 62
         ));
63 63
 
64 64
         return array_combine(
65
-            array_map(function (ReflectionParameter $parameter) : int {
65
+            array_map(function(ReflectionParameter $parameter) : int {
66 66
                 return $parameter->getPosition();
67 67
             }, $optionalParameters),
68 68
             $optionalParameters
Please login to merge, or discard this patch.
src/Comparator/BackwardsCompatibility/FunctionBased/MultiFunctionBased.php 1 patch
Spacing   +2 added lines, -2 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\FunctionBased;
6 6
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         return array_reduce(
23 23
             $this->checks,
24
-            function (Changes $changes, FunctionBased $check) use ($fromFunction, $toClass) : Changes {
24
+            function(Changes $changes, FunctionBased $check) use ($fromFunction, $toClass) : Changes {
25 25
                 return $changes->mergeWith($check->compare($fromFunction, $toClass));
26 26
             },
27 27
             Changes::new()
Please login to merge, or discard this patch.
src/Comparator/BackwardsCompatibility/InterfaceBased/MethodAdded.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 Roave\ApiCompare\Comparator\BackwardsCompatibility\InterfaceBased;
6 6
 
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
         $toMethods   = $this->methods($toInterface);
18 18
         $newMethods  = array_diff_key($toMethods, $fromMethods);
19 19
 
20
-        if (! $newMethods) {
20
+        if (!$newMethods) {
21 21
             return Changes::new();
22 22
         }
23 23
 
24
-        return Changes::fromArray(array_values(array_map(function (ReflectionMethod $method) use (
24
+        return Changes::fromArray(array_values(array_map(function(ReflectionMethod $method) use (
25 25
             $fromInterface
26 26
         ) : Change {
27 27
             return Change::added(
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $methods = $interface->getMethods();
42 42
 
43 43
         return array_combine(
44
-            array_map(function (ReflectionMethod $method) : string {
44
+            array_map(function(ReflectionMethod $method) : string {
45 45
                 return strtolower($method->getName());
46 46
             }, $methods),
47 47
             $methods
Please login to merge, or discard this patch.