@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | public function resolve(UseStatements $useStatements): TypeDeclaration |
38 | 38 | { |
39 | - return match (true) { |
|
39 | + return match(true) { |
|
40 | 40 | $this->isNullable => TypeDeclaration::fromNullable($useStatements->fullyQualifiedNameFor($this->types()[0])), |
41 | 41 | count($this->types) === 1 => TypeDeclaration::from($useStatements->fullyQualifiedNameFor($this->types()[0])), |
42 | 42 | default => $this->resolveUnionTypes($useStatements), |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | private function resolveUnionTypes(UseStatements $useStatements): TypeDeclaration |
47 | 47 | { |
48 | 48 | $withFullyQualifiedNames = array_map( |
49 | - static fn (Name $type) => $useStatements->fullyQualifiedNameFor($type), |
|
49 | + static fn(Name $type) => $useStatements->fullyQualifiedNameFor($type), |
|
50 | 50 | $this->types(), |
51 | 51 | ); |
52 | 52 | return TypeDeclaration::fromUnionType($withFullyQualifiedNames); |
@@ -55,6 +55,6 @@ discard block |
||
55 | 55 | /** @return Name[] */ |
56 | 56 | private function types(): array |
57 | 57 | { |
58 | - return array_map(static fn (string $type) => new Name(ltrim($type, characters: '\\')), $this->types); |
|
58 | + return array_map(static fn(string $type) => new Name(ltrim($type, characters: '\\')), $this->types); |
|
59 | 59 | } |
60 | 60 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $params = array_values(array_filter( |
33 | 33 | $parameterTags, |
34 | 34 | static fn (TagWithType|InvalidTag $parameter) => |
35 | - $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName |
|
35 | + $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName |
|
36 | 36 | )); |
37 | 37 | |
38 | 38 | if (count($params) < 1) { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** @var Param[] $params */ |
33 | 33 | $params = array_values(array_filter( |
34 | 34 | $parameterTags, |
35 | - static fn (TagWithType|InvalidTag $parameter) => |
|
35 | + static fn(TagWithType | InvalidTag $parameter) => |
|
36 | 36 | $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName |
37 | 37 | )); |
38 | 38 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | private function resolveType(?Type $type): ?TagType |
87 | 87 | { |
88 | - return match (true) { |
|
88 | + return match(true) { |
|
89 | 89 | $type === null => null, |
90 | 90 | $type instanceof Nullable => TagType::nullable((string) $type->getActualType()), |
91 | 91 | $type instanceof Compound => TagType::compound(array_map('strval', $type->getIterator()->getArrayCopy())), |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | public function endsWith(Name $name): bool |
17 | 17 | { |
18 | - return str_ends_with(haystack: (string) $this->name, needle: $name->removeArraySuffix()); |
|
18 | + return str_ends_with(haystack : (string) $this->name, needle : $name->removeArraySuffix()); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function includes(Name $name): bool |