@@ -2,7 +2,7 @@ |
||
| 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[]>>[]', []); |
@@ -21,6 +21,6 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function validate($value) : bool |
| 23 | 23 | { |
| 24 | - return ! is_resource($value); |
|
| 24 | + return !is_resource($value); |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | return implode( |
| 41 | 41 | '|', |
| 42 | 42 | array_map( |
| 43 | - static function (Type $subType) : string { |
|
| 43 | + static function(Type $subType) : string { |
|
| 44 | 44 | if ($subType instanceof CompositeType) { |
| 45 | 45 | return sprintf('(%s)', $subType->describe()); |
| 46 | 46 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function validate($value) : bool |
| 59 | 59 | { |
| 60 | 60 | foreach ($this->subTypes as $subType) { |
| 61 | - if (! $subType->validate($value)) { |
|
| 61 | + if (!$subType->validate($value)) { |
|
| 62 | 62 | continue; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -35,7 +35,7 @@ |
||
| 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 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | if ($id === Nodes::UNION) { |
| 115 | 115 | return new UnionType( |
| 116 | 116 | ...array_map( |
| 117 | - function (TreeNode $node) : Type { |
|
| 117 | + function(TreeNode $node) : Type { |
|
| 118 | 118 | return $this->visit($node); |
| 119 | 119 | }, |
| 120 | 120 | $element->getChildren() |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if ($id === Nodes::INTERSECTION) { |
| 126 | 126 | return new IntersectionType( |
| 127 | 127 | ...array_map( |
| 128 | - function (TreeNode $node) : Type { |
|
| 128 | + function(TreeNode $node) : Type { |
|
| 129 | 129 | return $this->visit($node); |
| 130 | 130 | }, |
| 131 | 131 | $element->getChildren() |