@@ -29,7 +29,7 @@ |
||
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 | } |
@@ -50,16 +50,16 @@ |
||
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 | } |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
@@ -30,7 +30,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -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[]>>[]', []); |