Completed
Pull Request — master (#76)
by Loren
02:06
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/Traits/ReflectionClassLikeTrait.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -323,6 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
     /**
325 325
      * {@inheritdoc}
326
+     * @param string $name
326 327
      */
327 328
     public function getMethod($name)
328 329
     {
@@ -593,6 +594,7 @@  discard block
 block discarded – undo
593 594
 
594 595
     /**
595 596
      * {@inheritdoc}
597
+     * @param string $name
596 598
      */
597 599
     public function hasMethod($name)
598 600
     {
@@ -623,6 +625,7 @@  discard block
 block discarded – undo
623 625
 
624 626
     /**
625 627
      * {@inheritDoc}
628
+     * @param string $interfaceName
626 629
      */
627 630
     public function implementsInterface($interfaceName)
628 631
     {
@@ -955,5 +958,8 @@  discard block
 block discarded – undo
955 958
         }
956 959
     }
957 960
 
961
+    /**
962
+     * @param string $className
963
+     */
958 964
     abstract protected function createReflectionForClass($className);
959 965
 }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 namespace Go\ParserReflection\Traits;
12 12
 
13 13
 use Go\ParserReflection\ReflectionClass;
14
-use ReflectionClass as BaseReflectionClass;
15 14
 use Go\ParserReflection\ReflectionException;
16 15
 use Go\ParserReflection\ReflectionMethod;
17 16
 use Go\ParserReflection\ReflectionProperty;
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/ReflectionMethod.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
         $paramString = '';
97 97
         $identation  = str_repeat(' ', 4);
98 98
         foreach ($methodParameters as $methodParameter) {
99
-            $paramString .= "\n{$identation}" . $methodParameter;
99
+            $paramString .= "\n{$identation}".$methodParameter;
100 100
         }
101 101
 
102 102
         return sprintf(
103 103
             "%sMethod [ <user%s%s%s>%s%s%s %s method %s ] {\n  @@ %s %d - %d{$paramFormat}{$returnFormat}\n}\n",
104
-            $this->getDocComment() ? $this->getDocComment() . "\n" : '',
104
+            $this->getDocComment() ? $this->getDocComment()."\n" : '',
105 105
             $prototype ? ", overwrites {$prototypeClass}, prototype {$prototypeClass}" : '',
106 106
             $this->isConstructor() ? ', ctor' : '',
107 107
             $this->isDestructor() ? ', dtor' : '',
@@ -117,9 +117,8 @@  discard block
 block discarded – undo
117 117
             $this->getEndLine(),
118 118
             count($methodParameters),
119 119
             $paramString,
120
-            (   $returnType ?
121
-                ReflectionType::convertToDisplayType($returnType) :
122
-                'UNUSED: Prevents convertToDisplayType() being called.')
120
+            ($returnType ?
121
+                ReflectionType::convertToDisplayType($returnType) : 'UNUSED: Prevents convertToDisplayType() being called.')
123 122
         );
124 123
     }
125 124
 
Please login to merge, or discard this patch.