Passed
Push — variadic-params-visibility-con... ( ca0a66 )
by Luis
13:54
created
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 function (Node $node): bool {
22
+        $useStatements = array_filter($nodes, static function(Node $node): bool {
23 23
             return $node instanceof TraitUse;
24 24
         });
25 25
 
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,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     protected function buildInterfaces(array $implements): array
20 20
     {
21
-        return array_map(static function (Name $name): DefinitionName {
21
+        return array_map(static function(Name $name): DefinitionName {
22 22
             return DefinitionName::from($name->getLast());
23 23
         }, $implements);
24 24
     }
Please login to merge, or discard this patch.
src/Templates/TemplateEngine.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function __construct(Twig $twig = null)
23 23
     {
24 24
         $this->twig = $twig ?? new Twig(new FilesystemLoader(__DIR__ . '/../resources/templates'));
25
-        $this->twig->addFilter(new Filter('whitespace', static function (string $html): ?string {
25
+        $this->twig->addFilter(new Filter('whitespace', static function(string $html): ?string {
26 26
             return preg_replace('/\s\s+/', '', $html);
27 27
         }));
28 28
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         try {
34 34
             return $this->twig->render($template, $values);
35
-        } catch (LoaderError | RuntimeError  | SyntaxError $e) {
35
+        } catch (LoaderError | RuntimeError | SyntaxError $e) {
36 36
             throw new TemplateFailure($e);
37 37
         }
38 38
     }
Please login to merge, or discard this patch.
src/Code/Definition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function countMethodsByVisibility(Visibility $modifier): int
39 39
     {
40
-        return \count(array_filter($this->methods, static function (Method $method) use ($modifier): bool {
40
+        return \count(array_filter($this->methods, static function(Method $method) use ($modifier): bool {
41 41
             return $method->hasVisibility($modifier);
42 42
         }));
43 43
     }
Please login to merge, or discard this patch.
src/Code/ClassDefinition.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function constructorParameters(): array
65 65
     {
66
-        $constructors = array_filter($this->methods, static function (Method $method): bool {
66
+        $constructors = array_filter($this->methods, static function(Method $method): bool {
67 67
             return $method->isConstructor();
68 68
         });
69 69
         $constructor = reset($constructors);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function countAttributesByVisibility(Visibility $modifier): int
80 80
     {
81
-        return \count(array_filter($this->attributes, static function (Attribute $attribute) use ($modifier): bool {
81
+        return \count(array_filter($this->attributes, static function(Attribute $attribute) use ($modifier): bool {
82 82
             return $attribute->hasVisibility($modifier);
83 83
         }));
84 84
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function countTypedAttributesByVisibility(Visibility $modifier): int
92 92
     {
93
-        return \count(array_filter($this->attributes, static function (Attribute $attribute) use ($modifier): bool {
93
+        return \count(array_filter($this->attributes, static function(Attribute $attribute) use ($modifier): bool {
94 94
             return $attribute->hasTypeDeclaration() && $attribute->hasVisibility($modifier);
95 95
         }));
96 96
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function isAbstract(): bool
150 150
     {
151
-        return \count(array_filter($this->methods(), static function (Method $method): bool {
151
+        return \count(array_filter($this->methods(), static function(Method $method): bool {
152 152
             return $method->isAbstract();
153 153
         })) > 0;
154 154
     }
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
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 use Rector\Set\ValueObject\SetList;
12 12
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
13 13
 
14
-return static function (ContainerConfigurator $containerConfigurator): void {
14
+return static function(ContainerConfigurator $containerConfigurator): void {
15 15
     // get parameters
16 16
     $parameters = $containerConfigurator->parameters();
17 17
 
Please login to merge, or discard this patch.
src/Graphviz/Builders/EdgesBuilder.php 1 patch
Spacing   +2 added lines, -2 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,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     private function needAssociation(ClassDefinition $class, HasType $attribute): bool
76 76
     {
77
-        return $attribute->isAReference() && ! $this->isAssociationResolved($class, $attribute);
77
+        return $attribute->isAReference() && !$this->isAssociationResolved($class, $attribute);
78 78
     }
79 79
 
80 80
     private function isAssociationResolved(ClassDefinition $class, HasType $attribute): bool
Please login to merge, or discard this patch.
src/Graphviz/Digraph.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
 
37 37
     public function id(): string
38 38
     {
39
-        return sha1((string) mt_rand());
39
+        return sha1((string)mt_rand());
40 40
     }
41 41
 }
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
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     private function __construct(string $name)
29 29
     {
30
-        if (! \in_array($name, self::$validNames, true)) {
30
+        if (!\in_array($name, self::$validNames, true)) {
31 31
             throw UnknownTheme::named($name, self::$validNames);
32 32
         }
33 33
         $this->name = $name;
Please login to merge, or discard this patch.