Passed
Push — type-resolver ( 7bd9fc...4891d0 )
by Luis
14:47
created
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/Parser/Code/Builders/Members/VisibilityBuilder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 
16 16
 final class VisibilityBuilder
17 17
 {
18
-    public function build(Property|ClassMethod|ClassConst $member): Visibility
18
+    public function build(Property | ClassMethod | ClassConst $member): Visibility
19 19
     {
20
-        return match (true) {
20
+        return match(true) {
21 21
             $member->isPublic() => Visibility::public(),
22 22
             $member->isPrivate() => Visibility::private(),
23 23
             default => Visibility::protected(),
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function fromFlags(int $flags): Visibility
28 28
     {
29
-        return match (true) {
30
-            (bool) ($flags & Class_::MODIFIER_PUBLIC) => Visibility::public(),
31
-            (bool) ($flags & Class_::MODIFIER_PROTECTED) => Visibility::protected(),
32
-            (bool) ($flags & Class_::MODIFIER_PRIVATE) => Visibility::private(),
29
+        return match(true) {
30
+            (bool)($flags & Class_::MODIFIER_PUBLIC) => Visibility::public(),
31
+            (bool)($flags & Class_::MODIFIER_PROTECTED) => Visibility::protected(),
32
+            (bool)($flags & Class_::MODIFIER_PRIVATE) => Visibility::private(),
33 33
             default => throw UnknownVisibilityFlag::withValue($flags)
34 34
         };
35 35
     }
Please login to merge, or discard this patch.
src/Parser/Code/Visitors/ClassVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     public function leaveNode(Node $node)
26 26
     {
27
-        if (! $node instanceof Class_) {
27
+        if (!$node instanceof Class_) {
28 28
             return null;
29 29
         }
30 30
         if ($node->isAnonymous()) {
Please login to merge, or discard this patch.
src/Processors/ImageProcessorName.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::NAMES, true)) {
19
+        if (!\in_array($name, self::NAMES, true)) {
20 20
             throw UnknownImageProcessor::named($name, self::NAMES);
21 21
         }
22 22
         $this->name = $name;
Please login to merge, or discard this patch.
rector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 use Rector\Set\ValueObject\SetList;
14 14
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
15 15
 
16
-return static function (ContainerConfigurator $containerConfigurator): void {
16
+return static function(ContainerConfigurator $containerConfigurator): void {
17 17
     $parameters = $containerConfigurator->parameters();
18 18
 
19 19
     $parameters->set(Option::PATHS, [__DIR__ . '/src', __DIR__ . '/tests']);
Please login to merge, or discard this patch.
src/Parser/Code/ExternalAssociationsResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 
41 41
     private function resolveExternalAttributes(ClassDefinition $definition, Codebase $codebase): void
42 42
     {
43
-        array_map(function (Attribute $attribute) use ($codebase): void {
43
+        array_map(function(Attribute $attribute) use ($codebase): void {
44 44
             $this->resolveExternalAssociationsFromTypeNames($attribute->references(), $codebase);
45 45
         }, $definition->attributes());
46 46
     }
47 47
 
48 48
     private function resolveExternalConstructorParameters(ClassDefinition $definition, Codebase $codebase): void
49 49
     {
50
-        array_map(function (Parameter $parameter) use ($codebase): void {
50
+        array_map(function(Parameter $parameter) use ($codebase): void {
51 51
             $this->resolveExternalAssociationsFromTypeNames($parameter->references(), $codebase);
52 52
         }, $definition->constructorParameters());
53 53
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /** @param Name[] $references */
56 56
     private function resolveExternalAssociationsFromTypeNames(array $references, Codebase $codebase): void
57 57
     {
58
-        array_map(static function (Name $reference) use ($codebase): void {
58
+        array_map(static function(Name $reference) use ($codebase): void {
59 59
             if ($codebase->has($reference)) {
60 60
                 return;
61 61
             }
Please login to merge, or discard this patch.
src/Parser/SourceCodeFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public static function fromConfiguration(CodeFinderConfiguration $configuration): SourceCodeFinder
24 24
     {
25 25
         $finder = new Finder();
26
-        if (! $configuration->recursive()) {
26
+        if (!$configuration->recursive()) {
27 27
             $finder->depth(0);
28 28
         }
29 29
         return new self($finder);
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
@@ -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.