Completed
Push — master ( 5a5570...b1ed96 )
by Marco
10s
created
src/TypesFinder/FindParameterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
                 throw new \LogicException('PhpParser left an "Error" node in the parameters AST, this should NOT happen');
59 59
             }
60 60
             if ($paramTag->getVariableName() === $node->var->name) {
61
-                return $this->resolveTypes->__invoke(explode('|', (string) $paramTag->getType()), $context);
61
+                return $this->resolveTypes->__invoke(explode('|', (string)$paramTag->getType()), $context);
62 62
             }
63 63
         }
64 64
 
Please login to merge, or discard this patch.
src/Reflection/ReflectionFunctionAbstract.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             // When we find the first parameter that does not have a default,
112 112
             // flip the flag as all params for this are no longer optional
113 113
             // EVEN if they have a default value
114
-            if (! $hasDefault) {
114
+            if (!$hasDefault) {
115 115
                 $overallOptionalFlag = false;
116 116
             }
117 117
 
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function getName() : string
127 127
     {
128
-        if (! $this->inNamespace()) {
128
+        if (!$this->inNamespace()) {
129 129
             return $this->getShortName();
130 130
         }
131 131
 
132
-        return $this->getNamespaceName() . '\\' . $this->getShortName();
132
+        return $this->getNamespaceName().'\\'.$this->getShortName();
133 133
     }
134 134
 
135 135
     /**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     public function getNamespaceName() : string
155 155
     {
156
-        if (! $this->inNamespace()) {
156
+        if (!$this->inNamespace()) {
157 157
             return '';
158 158
         }
159 159
 
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
     {
186 186
         return count(array_filter(
187 187
             $this->getParameters(),
188
-            function (ReflectionParameter $p) : bool {
189
-                return ! $p->isOptional();
188
+            function(ReflectionParameter $p) : bool {
189
+                return !$p->isOptional();
190 190
             }
191 191
         ));
192 192
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     public function isUserDefined() : bool
287 287
     {
288
-        return ! $this->isInternal();
288
+        return !$this->isInternal();
289 289
     }
290 290
 
291 291
     /**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                 return true;
322 322
             }
323 323
 
324
-            if (! is_array($nodeProperty)) {
324
+            if (!is_array($nodeProperty)) {
325 325
                 continue;
326 326
             }
327 327
 
@@ -407,10 +407,10 @@  discard block
 block discarded – undo
407 407
         }
408 408
 
409 409
         if ($returnType instanceof NullableType) {
410
-            return ReflectionType::createFromTypeAndReflector((string) $returnType->type, true, $this->reflector);
410
+            return ReflectionType::createFromTypeAndReflector((string)$returnType->type, true, $this->reflector);
411 411
         }
412 412
 
413
-        return ReflectionType::createFromTypeAndReflector((string) $returnType, false, $this->reflector);
413
+        return ReflectionType::createFromTypeAndReflector((string)$returnType, false, $this->reflector);
414 414
     }
415 415
 
416 416
     /**
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
      */
519 519
     public function setBodyFromString(string $newBody) : void
520 520
     {
521
-        $this->node->stmts = $this->loadStaticParser()->parse('<?php ' . $newBody);
521
+        $this->node->stmts = $this->loadStaticParser()->parse('<?php '.$newBody);
522 522
     }
523 523
 
524 524
     /**
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
     {
536 536
         // This slightly confusing code simply type-checks the $sourceLocators
537 537
         // array by unpacking them and splatting them in the closure.
538
-        $validator         = function (Node ...$node) : array {
538
+        $validator         = function(Node ...$node) : array {
539 539
             return $node;
540 540
         };
541 541
         $this->node->stmts = $validator(...$nodes);
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
                 throw new \LogicException('PhpParser left an "Error" node in the parameters AST, this should NOT happen');
562 562
             }
563 563
 
564
-            if (! is_string($paramNode->var->name) || strtolower($paramNode->var->name) !== $lowerName) {
564
+            if (!is_string($paramNode->var->name) || strtolower($paramNode->var->name) !== $lowerName) {
565 565
                 continue;
566 566
             }
567 567
 
Please login to merge, or discard this patch.
src/NodeCompiler/CompileNodeToValue.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             return $this($node->expr, $context);
34 34
         }
35 35
 
36
-        $constExprEvaluator = new ConstExprEvaluator(function (Node\Expr $node) use ($context) {
36
+        $constExprEvaluator = new ConstExprEvaluator(function(Node\Expr $node) use ($context) {
37 37
             if ($node instanceof Node\Expr\ConstFetch) {
38 38
                 return $this->compileConstFetch($node, $context);
39 39
             }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             case 'true':
74 74
                 return true;
75 75
             default:
76
-                if (! defined($firstName)) {
76
+                if (!defined($firstName)) {
77 77
                     throw Exception\UnableToCompileNode::becauseOfNotFoundConstantReference($context, $constNode);
78 78
                 }
79 79
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         $reflectionConstant = $classInfo->getReflectionConstant($nodeName);
116 116
 
117
-        if (! $reflectionConstant instanceof ReflectionClassConstant) {
117
+        if (!$reflectionConstant instanceof ReflectionClassConstant) {
118 118
             throw Exception\UnableToCompileNode::becauseOfNotFoundClassConstantReference($context, $classInfo, $node);
119 119
         }
120 120
 
Please login to merge, or discard this patch.