Completed
Push — master ( 49e6cb...c60371 )
by Alexander
02:20
created
src/ReflectionType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
             'int'  => 'integer',
86 86
             'bool' => 'boolean'
87 87
         ];
88
-        $displayType = (string)$type;
88
+        $displayType = (string) $type;
89 89
         if (isset($typeMap[$displayType])) {
90 90
             $displayType = $typeMap[$displayType];
91 91
         }
Please login to merge, or discard this patch.
src/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,4 +17,4 @@
 block discarded – undo
17 17
  */
18 18
 ReflectionEngine::init(new ComposerLocator());
19 19
 
20
-require(__DIR__ . '/polyfill.php');
20
+require(__DIR__.'/polyfill.php');
Please login to merge, or discard this patch.
src/ValueResolver/NodeExpressionResolver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     protected function resolveScalarMagicConstMethod()
142 142
     {
143 143
         if ($this->context instanceof \ReflectionMethod) {
144
-            $fullName = $this->context->getDeclaringClass()->name . '::' . $this->context->getShortName();
144
+            $fullName = $this->context->getDeclaringClass()->name.'::'.$this->context->getShortName();
145 145
 
146 146
             return $fullName;
147 147
         }
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
                 $fileNamespace = new ReflectionFileNamespace($fileName, $namespaceName);
234 234
                 if ($fileNamespace->hasConstant($constantName)) {
235 235
                     $constantValue = $fileNamespace->getConstant($constantName);
236
-                    $constantName  = $fileNamespace->getName() . '\\' . $constantName;
236
+                    $constantName  = $fileNamespace->getName().'\\'.$constantName;
237 237
                     $isResolved    = true;
238 238
                 }
239 239
             }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 $reason = 'Unable';
261 261
                 if ($classToReflect instanceof Expr) {
262 262
                     $methodName = $this->getDispatchMethodFor($classToReflect);
263
-                    $reason = "Method " . __CLASS__ . "::{$methodName}() not found trying";
263
+                    $reason = "Method ".__CLASS__."::{$methodName}() not found trying";
264 264
                 }
265 265
                 throw new ReflectionException("$reason to resolve class constant.");
266 266
             }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         }
278 278
 
279 279
         $this->isConstant = true;
280
-        $this->constantName = (string)$classToReflect . '::' . $constantName;
280
+        $this->constantName = (string) $classToReflect.'::'.$constantName;
281 281
 
282 282
         return $refClass->getConstant($constantName);
283 283
     }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
     protected function resolveExprBinaryOpConcat(Expr\BinaryOp\Concat $node)
363 363
     {
364
-        return $this->resolve($node->left) . $this->resolve($node->right);
364
+        return $this->resolve($node->left).$this->resolve($node->right);
365 365
     }
366 366
 
367 367
     protected function resolveExprTernary(Expr\Ternary $node)
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     private function getDispatchMethodFor(Node $node)
446 446
     {
447 447
         $nodeType = $node->getType();
448
-        return 'resolve' . str_replace('_', '', $nodeType);
448
+        return 'resolve'.str_replace('_', '', $nodeType);
449 449
     }
450 450
 
451 451
     /**
Please login to merge, or discard this patch.
src/ReflectionFileNamespace.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $comments   = $this->namespaceNode->getAttribute('comments');
181 181
 
182 182
         if ($comments) {
183
-            $docComment = (string)$comments[0];
183
+            $docComment = (string) $comments[0];
184 184
         }
185 185
 
186 186
         return $docComment;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
328 328
             if ($namespaceLevelNode instanceof ClassLike) {
329 329
                 $classShortName = $namespaceLevelNode->name;
330
-                $className = $namespaceName ? $namespaceName .'\\' . $classShortName : $classShortName;
330
+                $className = $namespaceName ? $namespaceName.'\\'.$classShortName : $classShortName;
331 331
 
332 332
                 $namespaceLevelNode->setAttribute('fileName', $this->fileName);
333 333
                 $classes[$className] = new ReflectionClass($className, $namespaceLevelNode);
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
352 352
             if ($namespaceLevelNode instanceof Function_) {
353 353
                 $funcShortName = $namespaceLevelNode->name;
354
-                $functionName  = $namespaceName ? $namespaceName .'\\' . $funcShortName : $funcShortName;
354
+                $functionName  = $namespaceName ? $namespaceName.'\\'.$funcShortName : $funcShortName;
355 355
 
356 356
                 $namespaceLevelNode->setAttribute('fileName', $this->fileName);
357 357
                 $functions[$funcShortName] = new ReflectionFunction($functionName, $namespaceLevelNode);
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
             foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
391 391
                 if ($namespaceLevelNode instanceof FuncCall
392 392
                     && $namespaceLevelNode->name instanceof Name
393
-                    && (string)$namespaceLevelNode->name === 'define'
393
+                    && (string) $namespaceLevelNode->name === 'define'
394 394
                 ) {
395 395
                     $expressionSolver->process($namespaceLevelNode->args[0]->value);
396 396
                     $constantName = $expressionSolver->getValue();
Please login to merge, or discard this patch.
src/ReflectionParameter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
         if ($hasDefaultValue) {
129 129
             $defaultValue = $this->getDefaultValue();
130 130
             if (is_string($defaultValue) && strlen($defaultValue) > 15) {
131
-                $defaultValue = substr($defaultValue, 0, 15) . '...';
131
+                $defaultValue = substr($defaultValue, 0, 15).'...';
132 132
             }
133 133
             /* @see https://3v4l.org/DJOEb for behaviour changes */
134 134
             if (is_double($defaultValue) && fmod($defaultValue, 1.0) === 0.0) {
135
-                $defaultValue = (int)$defaultValue;
135
+                $defaultValue = (int) $defaultValue;
136 136
             }
137 137
 
138 138
             $defaultValue = str_replace('\\\\', '\\', var_export($defaultValue, true));
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
             'Parameter #%d [ %s %s%s%s$%s%s ]',
143 143
             $this->parameterIndex,
144 144
             $isOptional ? '<optional>' : '<required>',
145
-            $parameterType ? ReflectionType::convertToDisplayType($parameterType) . ' ' : '',
145
+            $parameterType ? ReflectionType::convertToDisplayType($parameterType).' ' : '',
146 146
             $this->isVariadic() ? '...' : '',
147 147
             $this->isPassedByReference() ? '&' : '',
148 148
             $this->getName(),
149
-            ($isOptional && $hasDefaultValue) ? (' = ' . $defaultValue) : ''
149
+            ($isOptional && $hasDefaultValue) ? (' = '.$defaultValue) : ''
150 150
         );
151 151
     }
152 152
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
                 throw new ReflectionException("Can not resolve a class name for parameter");
198 198
             }
199
-            $className   = $parameterType->toString();
199
+            $className = $parameterType->toString();
200 200
             $classOrInterfaceExists = class_exists($className, false) || interface_exists($className, false);
201 201
 
202 202
             return $classOrInterfaceExists ? new \ReflectionClass($className) : new ReflectionClass($className);
Please login to merge, or discard this patch.