Passed
Pull Request — 5.0 (#11)
by Luis
11:53 queued 09:06
created
src/Parser/Code/Builders/TagType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/TagTypeFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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())),
Please login to merge, or discard this patch.
src/Code/UseStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.