Failed Conditions
Push — type ( 257e93...5997a7 )
by Michael
02:15
created
lib/Doctrine/Annotations/TypeParser/NativeTypeParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function __construct()
28 28
     {
29
-        $this->compiler = Llk::load(new Read(__DIR__ . '/type.pp'));
29
+        $this->compiler = Llk::load(new Read(__DIR__.'/type.pp'));
30 30
         $this->visitor  = new TypeVisitor();
31 31
     }
32 32
 
Please login to merge, or discard this patch.
lib/Doctrine/Annotations/TypeParser/PHPStanTypeParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         if ($typeNode instanceof UnionTypeNode) {
87 87
             return new UnionType(
88 88
                 ...array_map(
89
-                    function (TypeNode $type) use ($scope) : Type {
89
+                    function(TypeNode $type) use ($scope) : Type {
90 90
                         return $this->resolveType($type, $scope);
91 91
                     },
92 92
                     $typeNode->types
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         if ($typeNode instanceof IntersectionTypeNode) {
98 98
             return new IntersectionType(
99 99
                 ...array_map(
100
-                    function (TypeNode $type) use ($scope) : Type {
100
+                    function(TypeNode $type) use ($scope) : Type {
101 101
                         return $this->resolveType($type, $scope);
102 102
                     },
103 103
                     $typeNode->types
Please login to merge, or discard this patch.
lib/Doctrine/Annotations/TypeParser/TypeVisitor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         if ($element->getId() === Nodes::UNION) {
111 111
             return new UnionType(
112 112
                 ...array_map(
113
-                    function (TreeNode $node) : Type {
113
+                    function(TreeNode $node) : Type {
114 114
                         return $this->visit($node);
115 115
                     },
116 116
                     $element->getChildren()
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         if ($element->getId() === Nodes::INTERSECTION) {
122 122
             return new IntersectionType(
123 123
                 ...array_map(
124
-                    function (TreeNode $node) : Type {
124
+                    function(TreeNode $node) : Type {
125 125
                         return $this->visit($node);
126 126
                     },
127 127
                     $element->getChildren()
Please login to merge, or discard this patch.
lib/Doctrine/Annotations/Type/IntersectionType.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
         return implode(
30 30
             '&',
31 31
             array_map(
32
-                static function (Type $subType) : string {
32
+                static function(Type $subType) : string {
33 33
                     if ($subType instanceof CompositeType) {
34 34
                         return sprintf('(%s)', $subType->describe());
35 35
                     }
Please login to merge, or discard this patch.
lib/Doctrine/Annotations/Type/MapType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,16 +50,16 @@
 block discarded – undo
50 50
      */
51 51
     public function validate($value) : bool
52 52
     {
53
-        if (! is_array($value)) {
53
+        if (!is_array($value)) {
54 54
             return false;
55 55
         }
56 56
 
57 57
         foreach ($value as $key => $innerValue) {
58
-            if (! $this->keyType->validate($key)) {
58
+            if (!$this->keyType->validate($key)) {
59 59
                 return false;
60 60
             }
61 61
 
62
-            if (! $this->valueType->validate($innerValue)) {
62
+            if (!$this->valueType->validate($innerValue)) {
63 63
                 return false;
64 64
             }
65 65
         }
Please login to merge, or discard this patch.
lib/Doctrine/Annotations/Type/ListType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function validate($value) : bool
37 37
     {
38
-        if (! is_array($value)) {
38
+        if (!is_array($value)) {
39 39
             return false;
40 40
         }
41 41
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 return false;
46 46
             }
47 47
 
48
-            if (! $this->valueType->validate($innerValue)) {
48
+            if (!$this->valueType->validate($innerValue)) {
49 49
                 return false;
50 50
             }
51 51
 
Please login to merge, or discard this patch.
lib/Doctrine/Annotations/Type/UnionType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         return implode(
31 31
             '|',
32 32
             array_map(
33
-                static function (Type $subType) : string {
33
+                static function(Type $subType) : string {
34 34
                     if ($subType instanceof CompositeType) {
35 35
                         return sprintf('(%s)', $subType->describe());
36 36
                     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     public function validate($value) : bool
49 49
     {
50 50
         foreach ($this->subTypes as $subType) {
51
-            if (! $subType->validate($value)) {
51
+            if (!$subType->validate($value)) {
52 52
                 continue;
53 53
             }
54 54
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function acceptsNull() : bool
62 62
     {
63 63
         foreach ($this->subTypes as $subType) {
64
-            if (! $subType->acceptsNull()) {
64
+            if (!$subType->acceptsNull()) {
65 65
                 continue;
66 66
             }
67 67
 
Please login to merge, or discard this patch.
test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Doctrine\Annotations\TypeParser\NativeTypeParser;
4 4
 
5
-require_once __DIR__ . '/vendor/autoload.php';
5
+require_once __DIR__.'/vendor/autoload.php';
6 6
 
7 7
 $parser = new NativeTypeParser();
8 8
 $type   = $parser->parsePropertyType('@var array<int, array<int, stdClass[]>>[]', []);
Please login to merge, or discard this patch.