Passed
Push — master ( d46d5f...674e23 )
by Luis
44s queued 12s
created
src/Graphviz/Builders/EdgesBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $edges = [];
60 60
         foreach ($variables as $parameter) {
61
-            if (! $this->needAssociation($class, $parameter)) {
61
+            if (!$this->needAssociation($class, $parameter)) {
62 62
                 continue;
63 63
             }
64 64
             $edges[] = $this->addAssociations($class, $parameter, $codebase);
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
         $this->markAssociationResolvedFor($class, $attribute);
73 73
 
74 74
         return array_map(
75
-            static fn (Name $reference): Edge => Edge::association($codebase->get($reference), $class),
75
+            static fn(Name $reference): Edge => Edge::association($codebase->get($reference), $class),
76 76
             $attribute->references()
77 77
         );
78 78
     }
79 79
 
80 80
     private function needAssociation(ClassDefinition $class, HasType $attribute): bool
81 81
     {
82
-        return ! $this->isAssociationResolved($class, $attribute);
82
+        return !$this->isAssociationResolved($class, $attribute);
83 83
     }
84 84
 
85 85
     private function isAssociationResolved(ClassDefinition $class, HasType $attribute): bool
Please login to merge, or discard this patch.
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
     {
33 33
         $useStatements = $this->useStatementsBuilder->build($trait);
34 34
         return new TraitDefinition(
35
-            new Name((string) $trait->namespacedName),
35
+            new Name((string)$trait->namespacedName),
36 36
             $this->membersBuilder->methods($trait->getMethods(), $useStatements),
37 37
             $this->membersBuilder->attributes($trait->stmts, $trait->getMethod('__construct'), $useStatements),
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
@@ -36,10 +36,10 @@
 block discarded – undo
36 36
         $useStatements = $this->useStatementsBuilder->build($class);
37 37
 
38 38
         return new ClassDefinition(
39
-            new ClassDefinitionName((string) $class->namespacedName),
39
+            new ClassDefinitionName((string)$class->namespacedName),
40 40
             $this->membersBuilder->methods($class->getMethods(), $useStatements),
41 41
             $this->membersBuilder->constants($class->stmts),
42
-            $class->extends !== null ? new ClassDefinitionName((string) $class->extends) : null,
42
+            $class->extends !== null ? new ClassDefinitionName((string)$class->extends) : null,
43 43
             $this->membersBuilder->attributes($class->stmts, $class->getMethod('__construct'), $useStatements),
44 44
             $this->buildInterfaces($class->implements),
45 45
             $this->buildTraits($class->stmts)
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Names/TraitNamesBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     private 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
         $traits = [];
25 25
         /** @var TraitUse $use */
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     private function traitNames(TraitUse $use, array $traits): array
38 38
     {
39 39
         foreach ($use->traits as $name) {
40
-            $traits[] = new TraitName((string) $name);
40
+            $traits[] = new TraitName((string)$name);
41 41
         }
42 42
         return $traits;
43 43
     }
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
     private function buildInterfaces(array $implements): array
20 20
     {
21
-        return array_map(static fn (Name $name): DefinitionName => new DefinitionName((string) $name), $implements);
21
+        return array_map(static fn(Name $name): DefinitionName => new DefinitionName((string)$name), $implements);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/ParametersBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function build(array $parameters, ?Doc $methodDocBlock, UseStatements $useStatements): array
27 27
     {
28
-        return array_map(function (Param $parameter) use ($methodDocBlock, $useStatements): Parameter {
28
+        return array_map(function(Param $parameter) use ($methodDocBlock, $useStatements) : Parameter {
29 29
             /** @var \PhpParser\Node\Expr\Variable $parsedParameter Since the parser throws error by default */
30 30
             $parsedParameter = $parameter->var;
31 31
 
Please login to merge, or discard this patch.
src/Parser/Code/Builders/InterfaceDefinitionBuilder.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
     {
33 33
         $useStatements = $this->useStatementsBuilder->build($interface);
34 34
         return new InterfaceDefinition(
35
-            new InterfaceDefinitionName((string) $interface->namespacedName),
35
+            new InterfaceDefinitionName((string)$interface->namespacedName),
36 36
             $this->membersBuilder->methods($interface->getMethods(), $useStatements),
37 37
             $this->membersBuilder->constants($interface->stmts),
38 38
             $this->buildInterfaces($interface->extends)
Please login to merge, or discard this patch.
src/Code/UseStatements.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
                 return $useStatement->fullyQualifiedName($name);
25 25
             }
26 26
         }
27
-        return (string) $name;
27
+        return (string)$name;
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/Code/Variables/TypeDeclaration.php 1 patch
Spacing   +8 added lines, -8 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((string) $name), $this->names);
75
-        $references = array_filter($typesFromUnion, static fn (TypeDeclaration $type) => ! $type->isBuiltIn());
74
+        $typesFromUnion = array_map(static fn(Name $name) => TypeDeclaration::from((string)$name), $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,10 +88,10 @@  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
-        $type = (string) $this->names[0];
94
+        $type = (string)$this->names[0];
95 95
         if ($this->isArray()) {
96 96
             $type = $this->removeArraySuffix();
97 97
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function isBuiltInArray(): bool
108 108
     {
109 109
         if ($this->isRegularType()) {
110
-            return (string) $this->names[0] === 'array';
110
+            return (string)$this->names[0] === 'array';
111 111
         }
112 112
         return false;
113 113
     }
Please login to merge, or discard this patch.