Passed
Push — union-types ( b56600 )
by Luis
14:03
created
src/Parser/Code/Builders/TraitDefinitionBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function build(Trait_ $trait): TraitDefinition
33 33
     {
34 34
         return new TraitDefinition(
35
-            new Name((string) $trait->name),
35
+            new Name((string)$trait->name),
36 36
             $this->membersBuilder->methods($trait->getMethods()),
37 37
             $this->membersBuilder->attributes($trait->stmts),
38 38
             $this->buildTraits($trait->stmts)
Please login to merge, or discard this patch.
src/Parser/Code/Builders/ClassDefinitionBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
     public function build(Class_ $class): ClassDefinition
36 36
     {
37 37
         return new ClassDefinition(
38
-            new ClassDefinitionName((string) $class->name),
38
+            new ClassDefinitionName((string)$class->name),
39 39
             $this->membersBuilder->methods($class->getMethods()),
40 40
             $this->membersBuilder->constants($class->stmts),
41
-            $class->extends !== null ? new ClassDefinitionName((string) end($class->extends->parts)) : null,
41
+            $class->extends !== null ? new ClassDefinitionName((string)end($class->extends->parts)) : null,
42 42
             $this->membersBuilder->attributes($class->stmts),
43 43
             $this->buildInterfaces($class->implements),
44 44
             $this->buildTraits($class->stmts)
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Names/TraitNamesBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     protected function buildTraits(array $nodes): array
21 21
     {
22
-        $useStatements = array_filter($nodes, static fn (Node $node): bool => $node instanceof TraitUse);
22
+        $useStatements = array_filter($nodes, static fn(Node $node): bool => $node instanceof TraitUse);
23 23
 
24 24
         if (count($useStatements) === 0) {
25 25
             return [];
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Names/InterfaceNamesBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
      */
19 19
     protected function buildInterfaces(array $implements): array
20 20
     {
21
-        return array_map(static fn (Name $name): DefinitionName => new DefinitionName($name->getLast()), $implements);
21
+        return array_map(static fn(Name $name): DefinitionName => new DefinitionName($name->getLast()), $implements);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/FilteredAttributesBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@
 block discarded – undo
46 46
      */
47 47
     public function build(array $parsedAttributes): array
48 48
     {
49
-        $attributes = array_filter($parsedAttributes, static fn ($attribute): bool => $attribute instanceof Property);
49
+        $attributes = array_filter($parsedAttributes, static fn($attribute): bool => $attribute instanceof Property);
50 50
 
51
-        return array_map(function (Property $attribute): Attribute {
51
+        return array_map(function(Property $attribute): Attribute {
52 52
             $variable = new Variable(
53 53
                 "\${$attribute->props[0]->name}",
54 54
                 $this->typeBuilder->fromAttributeType($attribute->type, $attribute->getDocComment())
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/FilteredMethodsBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     public function build(array $methods): array
49 49
     {
50 50
         return array_map(
51
-            fn (ClassMethod $method): Method => $this->buildMethod($method),
51
+            fn(ClassMethod $method): Method => $this->buildMethod($method),
52 52
             $this->visibilityFilters->apply($methods)
53 53
         );
54 54
     }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/TypeBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@
 block discarded – undo
68 68
     {
69 69
         switch (true) {
70 70
             case $type instanceof NullableType:
71
-                return TypeDeclaration::fromNullable((string) $type->type);
71
+                return TypeDeclaration::fromNullable((string)$type->type);
72 72
             case $type instanceof Name:
73 73
                 return TypeDeclaration::from($type->getLast());
74 74
             case $type instanceof Identifier:
75
-                return TypeDeclaration::from((string) $type);
75
+                return TypeDeclaration::from((string)$type);
76 76
             default:
77 77
                 throw UnsupportedType::declaredAs($type);
78 78
         }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/FilteredConstantsBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
      */
43 43
     public function build(array $classAttributes): array
44 44
     {
45
-        $constants = array_filter($classAttributes, static fn ($attribute): bool => $attribute instanceof ClassConst);
45
+        $constants = array_filter($classAttributes, static fn($attribute): bool => $attribute instanceof ClassConst);
46 46
 
47
-        return array_map(fn (ClassConst $constant): Constant => new Constant(
48
-            (string) $constant->consts[0]->name,
47
+        return array_map(fn(ClassConst $constant): Constant => new Constant(
48
+            (string)$constant->consts[0]->name,
49 49
             TypeDeclaration::from($this->determineType($constant->consts[0])),
50 50
             $this->visibilityBuilder->build($constant)
51 51
         ), $this->visibilityFilters->apply($constants));
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/VisibilityFilters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $attributes = $classMembers;
45 45
         foreach ($this->filters as $filter) {
46
-            $attributes = array_filter($attributes, static fn (Stmt $member): bool => $filter->accept($member));
46
+            $attributes = array_filter($attributes, static fn(Stmt $member): bool => $filter->accept($member));
47 47
         }
48 48
         return $attributes;
49 49
     }
Please login to merge, or discard this patch.