@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | /** @return null|int|Node|Node[] */ |
24 | - public function leaveNode(Node $node): null|int|Node|array |
|
24 | + public function leaveNode(Node $node): null | int | Node | array |
|
25 | 25 | { |
26 | 26 | if ($node instanceof Enum_) { |
27 | 27 | $this->codebase->add($this->builder->build($node)); |
@@ -21,9 +21,9 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | /** @return null|int|Node|Node[] */ |
24 | - public function leaveNode(Node $node): null|int|Node|array |
|
24 | + public function leaveNode(Node $node): null | int | Node | array |
|
25 | 25 | { |
26 | - if (! $node instanceof Class_) { |
|
26 | + if (!$node instanceof Class_) { |
|
27 | 27 | return null; |
28 | 28 | } |
29 | 29 | if ($node->isAnonymous()) { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | /** @return null|int|Node|Node[] */ |
24 | - public function leaveNode(Node $node): null|int|Node|array |
|
24 | + public function leaveNode(Node $node): null | int | Node | array |
|
25 | 25 | { |
26 | 26 | if ($node instanceof Trait_) { |
27 | 27 | $this->codebase->add($this->builder->build($node)); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | /** @return null|int|Node|Node[] */ |
24 | - public function leaveNode(Node $node): null|int|Node|array |
|
24 | + public function leaveNode(Node $node): null | int | Node | array |
|
25 | 25 | { |
26 | 26 | if ($node instanceof Interface_) { |
27 | 27 | $this->codebase->add($this->builder->build($node)); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | public function fromType( |
29 | - Identifier|Name|ComplexType|null $type, |
|
29 | + Identifier | Name | ComplexType | null $type, |
|
30 | 30 | ?Doc $docBlock, |
31 | 31 | TagName $tagName, |
32 | 32 | UseStatements $useStatements, |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | $typeDeclaration = $this->fromParsedType($type); |
41 | - if (! $typeDeclaration->isBuiltInArray()) { |
|
41 | + if (!$typeDeclaration->isBuiltInArray()) { |
|
42 | 42 | return $typeDeclaration; |
43 | 43 | } |
44 | 44 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | return $typeFromDocBlock->isPresent() ? $typeFromDocBlock : $typeDeclaration; |
48 | 48 | } |
49 | 49 | |
50 | - private function fromParsedType(Identifier|Name|ComplexType|null $type): TypeDeclaration |
|
50 | + private function fromParsedType(Identifier | Name | ComplexType | null $type): TypeDeclaration |
|
51 | 51 | { |
52 | 52 | return match (true) { |
53 | 53 | $type instanceof NullableType => TypeDeclaration::fromNullable((string) $type->type), |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function build(array $parsedProperties, UseStatements $useStatements): array |
33 | 33 | { |
34 | - return array_map(function (ParsedProperty $property) use ($useStatements): Property { |
|
34 | + return array_map(function(ParsedProperty $property) use ($useStatements): Property { |
|
35 | 35 | $variable = new Variable( |
36 | 36 | "\${$property->props[0]->name}", |
37 | 37 | $this->typeBuilder->fromType($property->type, $property->getDocComment(), TagName::VAR, $useStatements) |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function fromPromotedProperties(array $promotedProperties, UseStatements $useStatements): array |
50 | 50 | { |
51 | - return array_map(function (Node\Param $param) use ($useStatements): Property { |
|
51 | + return array_map(function(Node\Param $param) use ($useStatements): Property { |
|
52 | 52 | /** @var Node\Expr\Variable $var */ |
53 | 53 | $var = $param->var; |
54 | 54 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | final class UseStatementsBuilder |
21 | 21 | { |
22 | - public function build(Class_|Interface_|Trait_|Enum_ $definition): UseStatements |
|
22 | + public function build(Class_ | Interface_ | Trait_ | Enum_ $definition): UseStatements |
|
23 | 23 | { |
24 | 24 | $uses = []; |
25 | 25 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | private function fromType(Type $type): TagType |
63 | 63 | { |
64 | - if (! $type instanceof Object_) { |
|
64 | + if (!$type instanceof Object_) { |
|
65 | 65 | return TagType::named((string) $type); |
66 | 66 | } |
67 | 67 | if ($type->getFqsen() === null) { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | public function filter(string $parameterName): callable |
16 | 16 | { |
17 | - return static fn (TagWithType|InvalidTag $parameter) |
|
17 | + return static fn (TagWithType | InvalidTag $parameter) |
|
18 | 18 | => $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName; |
19 | 19 | } |
20 | 20 | } |