Passed
Pull Request — 5.0 (#19)
by
unknown
20:33
created
src/Code/Variables/TypeDeclaration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /** @param string[] $types */
51 51
     public static function fromUnionType(array $types): TypeDeclaration
52 52
     {
53
-        return new TypeDeclaration(array_map(static fn (string $type) => new Name($type), $types));
53
+        return new TypeDeclaration(array_map(static fn(string $type) => new Name($type), $types));
54 54
     }
55 55
 
56 56
     public function isPresent(): bool
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /** @return Name[] */
62 62
     public function references(): array
63 63
     {
64
-        if (! $this->isPresent()) {
64
+        if (!$this->isPresent()) {
65 65
             return [];
66 66
         }
67 67
         if ($this->isBuiltIn()) {
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
             return [$this->isArray() ? new Name($this->removeArraySuffix()) : $this->names[0]];
72 72
         }
73 73
 
74
-        $typesFromUnion = array_map(static fn (Name $name) => TypeDeclaration::from($name->fullName()), $this->names);
75
-        $references = array_filter($typesFromUnion, static fn (TypeDeclaration $type) => ! $type->isBuiltIn());
74
+        $typesFromUnion = array_map(static fn(Name $name) => TypeDeclaration::from($name->fullName()), $this->names);
75
+        $references = array_filter($typesFromUnion, static fn(TypeDeclaration $type) => !$type->isBuiltIn());
76 76
 
77 77
         return array_map(
78
-            static fn (TypeDeclaration $reference) => $reference->isArray()
78
+            static fn(TypeDeclaration $reference) => $reference->isArray()
79 79
                 ? new Name($reference->removeArraySuffix())
80 80
                 : $reference->names[0],
81 81
             $references
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function isBuiltIn(): bool
90 90
     {
91
-        if (! $this->isRegularType()) {
91
+        if (!$this->isRegularType()) {
92 92
             return false;
93 93
         }
94 94
         $type = (string) $this->names[0];
Please login to merge, or discard this patch.