Passed
Pull Request — master (#38)
by Marco
01:52
created
test/unit/Comparator/Variance/TypeIsContravariantTest.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 RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassBased;
6 6
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         return array_merge(
221 221
             [[null]],
222 222
             array_merge(...array_map(
223
-                function (string $type) : array {
223
+                function(string $type) : array {
224 224
                     return [
225 225
                         [ReflectionType::createFromType($type, false)],
226 226
                         [ReflectionType::createFromType($type, true)],
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
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             return false;
34 34
         }
35 35
 
36
-        if ($comparedType->allowsNull() && ! $type->allowsNull()) {
36
+        if ($comparedType->allowsNull() && !$type->allowsNull()) {
37 37
             return false;
38 38
         }
39 39
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return false;
50 50
         }
51 51
 
52
-        if (strtolower($typeAsString) === 'object' && ! $comparedType->isBuiltin()) {
52
+        if (strtolower($typeAsString) === 'object' && !$comparedType->isBuiltin()) {
53 53
             // `object` is not covariant to a defined class type
54 54
             return true;
55 55
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             return true;
60 60
         }
61 61
 
62
-        if (strtolower($typeAsString) === 'iterable' && ! $comparedType->isBuiltin()) {
62
+        if (strtolower($typeAsString) === 'iterable' && !$comparedType->isBuiltin()) {
63 63
             /** @var ReflectionClass $comparedTypeReflectionClass */
64 64
             $comparedTypeReflectionClass = $reflector->reflect($comparedTypeAsString);
65 65
 
Please login to merge, or discard this patch.
src/Comparator/Variance/TypeIsContravariant.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\Variance;
6 6
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             return false;
33 33
         }
34 34
 
35
-        if ($type->allowsNull() && ! $comparedType->allowsNull()) {
35
+        if ($type->allowsNull() && !$comparedType->allowsNull()) {
36 36
             return false;
37 37
         }
38 38
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             return true;
49 49
         }
50 50
 
51
-        if (strtolower($comparedTypeAsString) === 'object' && ! $type->isBuiltin()) {
51
+        if (strtolower($comparedTypeAsString) === 'object' && !$type->isBuiltin()) {
52 52
             // `object` is always contravariant to any object type
53 53
             return true;
54 54
         }
Please login to merge, or discard this patch.
test/unit/Comparator/Variance/TypeIsCovariantTest.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 RoaveTest\ApiCompare\Comparator\BackwardsCompatibility\ClassBased;
6 6
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         return array_merge(
221 221
             [[null]],
222 222
             array_merge(...array_map(
223
-                function (string $type) : array {
223
+                function(string $type) : array {
224 224
                     return [
225 225
                         [ReflectionType::createFromType($type, false)],
226 226
                         [ReflectionType::createFromType($type, true)],
Please login to merge, or discard this patch.