Passed
Push — union-types ( b36cfd...cd7236 )
by Luis
13:54
created
src/Generators/ClassDiagramGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             ->pipe($this->parseCode)
51 51
             ->pipe($this->createDigraph)
52 52
             ->pipe($this->createClassDiagram)
53
-            ->pipe(fn (OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath()));
53
+            ->pipe(fn(OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath()));
54 54
 
55 55
         $pipeline->process($input->codebaseDirectory());
56 56
     }
Please login to merge, or discard this patch.
src/Generators/StatisticsGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             ->pipe($this->findCode)
48 48
             ->pipe($this->parseCode)
49 49
             ->pipe($this->calculateStatistics)
50
-            ->pipe(fn (OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath()));
50
+            ->pipe(fn(OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath()));
51 51
 
52 52
         $pipeline->process($input->codebaseDirectory());
53 53
     }
Please login to merge, or discard this patch.
src/Generators/StatisticsGeneratorConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /** @param mixed[] $options*/
31 31
     public function __construct(array $options, private ProgressDisplay $display)
32 32
     {
33
-        $recursive = (bool) ($options['recursive'] ?? false);
33
+        $recursive = (bool)($options['recursive'] ?? false);
34 34
         $this->codeFinder = $recursive ? SourceCodeFinder::recursive() : SourceCodeFinder::nonRecursive();
35 35
         $this->codeParser = CodeParser::fromConfiguration(new CodeParserConfiguration($options));
36 36
         $this->statisticsProcessor = new StatisticsProcessor(new TemplateEngine());
Please login to merge, or discard this patch.
src/Graphviz/Styles/ThemeName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
     public function __construct(string $name)
18 18
     {
19
-        if (! \in_array($name, self::VALID_NAMES, true)) {
19
+        if (!\in_array($name, self::VALID_NAMES, true)) {
20 20
             throw UnknownTheme::named($name, self::VALID_NAMES);
21 21
         }
22 22
         $this->name = $name;
Please login to merge, or discard this patch.
src/Graphviz/Builders/EdgesBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $edges = [];
59 59
         foreach ($variables as $parameter) {
60
-            if (! $this->needAssociation($class, $parameter)) {
60
+            if (!$this->needAssociation($class, $parameter)) {
61 61
                 continue;
62 62
             }
63 63
             $edges[] = $this->addAssociation($class, $parameter, $codebase);
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 
75 75
     private function needAssociation(ClassDefinition $class, HasType $attribute): bool
76 76
     {
77
-        if (! $attribute->isAReference()) {
77
+        if (!$attribute->isAReference()) {
78 78
             return false;
79 79
         }
80
-        return ! $this->isAssociationResolved($class, $attribute);
80
+        return !$this->isAssociationResolved($class, $attribute);
81 81
     }
82 82
 
83 83
     private function isAssociationResolved(ClassDefinition $class, HasType $attribute): bool
Please login to merge, or discard this patch.
src/Parser/CodeParserConfiguration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
     /** @param mixed[] $options */
23 23
     public function __construct(array $options)
24 24
     {
25
-        $this->extractAssociations = (bool) ($options['associations'] ?? false);
26
-        $this->hidePrivate = (bool) ($options['hide-private'] ?? false);
27
-        $this->hideProtected = (bool) ($options['hide-protected'] ?? false);
28
-        $this->hideAttributes = (bool) ($options['hide-attributes'] ?? false);
29
-        $this->hideMethods = (bool) ($options['hide-methods'] ?? false);
25
+        $this->extractAssociations = (bool)($options['associations'] ?? false);
26
+        $this->hidePrivate = (bool)($options['hide-private'] ?? false);
27
+        $this->hideProtected = (bool)($options['hide-protected'] ?? false);
28
+        $this->hideAttributes = (bool)($options['hide-attributes'] ?? false);
29
+        $this->hideMethods = (bool)($options['hide-methods'] ?? false);
30 30
     }
31 31
 
32 32
     public function extractAssociations(): 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
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     public function build(Trait_ $trait): TraitDefinition
30 30
     {
31 31
         return new TraitDefinition(
32
-            new Name((string) $trait->name),
32
+            new Name((string)$trait->name),
33 33
             $this->membersBuilder->methods($trait->getMethods()),
34 34
             $this->membersBuilder->attributes($trait->stmts, $trait->getMethod('__construct')),
35 35
             $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
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
     public function build(Class_ $class): ClassDefinition
33 33
     {
34 34
         return new ClassDefinition(
35
-            new ClassDefinitionName((string) $class->name),
35
+            new ClassDefinitionName((string)$class->name),
36 36
             $this->membersBuilder->methods($class->getMethods()),
37 37
             $this->membersBuilder->constants($class->stmts),
38
-            $class->extends !== null ? new ClassDefinitionName((string) end($class->extends->parts)) : null,
38
+            $class->extends !== null ? new ClassDefinitionName((string)end($class->extends->parts)) : null,
39 39
             $this->membersBuilder->attributes($class->stmts, $class->getMethod('__construct')),
40 40
             $this->buildInterfaces($class->implements),
41 41
             $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
     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
         if (count($useStatements) === 0) {
25 25
             return [];
Please login to merge, or discard this patch.