Passed
Push — variadic-params-visibility-con... ( ca0a66 )
by Luis
13:54
created
src/Code/Methods/MethodDocBlock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function returnType(): TypeDeclaration
33 33
     {
34 34
         $type = null;
35
-        if (preg_match(self::$returnExpression, (string) $this->comment, $matches) === 1) {
35
+        if (preg_match(self::$returnExpression, (string)$this->comment, $matches) === 1) {
36 36
             $type = trim($matches[1]);
37 37
         }
38 38
         return TypeDeclaration::from($type);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function setParameters(): void
53 53
     {
54
-        if (preg_match_all(self::$parameterExpression, (string) $this->comment, $matches) < 1) {
54
+        if (preg_match_all(self::$parameterExpression, (string)$this->comment, $matches) < 1) {
55 55
             return;
56 56
         }
57 57
         foreach ($matches[0] as $typeHint) {
Please login to merge, or discard this patch.
src/Code/Variables/WithTypeDeclaration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /** @see HasType::isAReference() for more details */
16 16
     public function isAReference(): bool
17 17
     {
18
-        return $this->hasTypeDeclaration() && ! $this->type->isBuiltIn();
18
+        return $this->hasTypeDeclaration() && !$this->type->isBuiltIn();
19 19
     }
20 20
 
21 21
     /** @see HasType::hasTypeDeclaration() for more details */
Please login to merge, or discard this patch.
src/Code/Variables/TypeDeclaration.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
     public function isBuiltIn(): bool
60 60
     {
61
-        $type = (string) $this->name;
61
+        $type = (string)$this->name;
62 62
         if ($this->isArray()) {
63 63
             $type = $this->removeArraySuffix();
64 64
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function isArray(): bool
69 69
     {
70
-        return strpos((string) $this->name, '[]') === \strlen((string) $this->name) - 2;
70
+        return strpos((string)$this->name, '[]') === \strlen((string)$this->name) - 2;
71 71
     }
72 72
 
73 73
     public function isNullable(): bool
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function removeArraySuffix(): string
79 79
     {
80
-        return substr((string) $this->name, 0, -2);
80
+        return substr((string)$this->name, 0, -2);
81 81
     }
82 82
 
83 83
     public function __toString()
Please login to merge, or discard this patch.
src/Parser/CodebaseDirectory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function absolutePath(): string
23 23
     {
24
-        return (string) $this->directory->getRealPath();
24
+        return (string)$this->directory->getRealPath();
25 25
     }
26 26
 
27 27
     private function __construct(string $path)
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private function setDirectory(SplFileInfo $path): void
33 33
     {
34
-        if (! $path->isDir()) {
34
+        if (!$path->isDir()) {
35 35
             throw InvalidDirectory::notFoundAt($path);
36 36
         }
37 37
         $this->directory = $path;
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Filters/PrivateVisibilityFilter.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
     /** @param ClassMethod|Property $member */
19 19
     public function accept($member): bool
20 20
     {
21
-        return ! $member->isPrivate();
21
+        return !$member->isPrivate();
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Filters/ProtectedVisibilityFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
     /** @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property $member */
16 16
     public function accept($member): bool
17 17
     {
18
-        return ! $member->isProtected();
18
+        return !$member->isProtected();
19 19
     }
20 20
 }
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
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
      */
44 44
     public function build(array $parsedAttributes): array
45 45
     {
46
-        $attributes = array_filter($parsedAttributes, static function ($attribute): bool {
46
+        $attributes = array_filter($parsedAttributes, static function($attribute): bool {
47 47
             return $attribute instanceof Property;
48 48
         });
49 49
 
50
-        return array_map(function (Property $attribute): Attribute {
50
+        return array_map(function(Property $attribute): Attribute {
51 51
             $name = "\${$attribute->props[0]->name}";
52 52
             $visibility = $this->visibilityBuilder->build($attribute);
53 53
             $comment = $attribute->getDocComment() === null ? null : $attribute->getDocComment()->getText();
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
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function build(array $methods): array
54 54
     {
55
-        return array_map(function (ClassMethod $method): Method {
55
+        return array_map(function(ClassMethod $method): Method {
56 56
             return $this->buildMethod($method);
57 57
         }, $this->visibilityFilters->apply($methods));
58 58
     }
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
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function build(array $parameters, MethodDocBlock $methodDocBlock): array
30 30
     {
31
-        return array_map(function (Param $parameter) use ($methodDocBlock): Parameter {
31
+        return array_map(function(Param $parameter) use ($methodDocBlock): Parameter {
32 32
             /** @var \PhpParser\Node\Expr\Variable $parsedParameter Since the parser throws error by default */
33 33
             $parsedParameter = $parameter->var;
34 34
 
Please login to merge, or discard this patch.