Completed
Pull Request — master (#118)
by
unknown
23:38
created
src/Traits/ReflectionClassLikeTrait.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -147,19 +147,19 @@  discard block
 block discarded – undo
147 147
             }
148 148
         }
149 149
 
150
-        $buildString = static function (array $items, $indentLevel = 4) {
150
+        $buildString = static function(array $items, $indentLevel = 4) {
151 151
             if (!count($items)) {
152 152
                 return '';
153 153
             }
154
-            $indent = "\n" . str_repeat(' ', $indentLevel);
154
+            $indent = "\n".str_repeat(' ', $indentLevel);
155 155
 
156
-            return $indent . implode($indent, explode("\n", implode("\n", $items)));
156
+            return $indent.implode($indent, explode("\n", implode("\n", $items)));
157 157
         };
158 158
 
159
-        $buildConstants = static function (array $items, $indentLevel = 4) {
159
+        $buildConstants = static function(array $items, $indentLevel = 4) {
160 160
             $str = '';
161 161
             foreach ($items as $name => $value) {
162
-                $str .= "\n" . str_repeat(' ', $indentLevel);
162
+                $str .= "\n".str_repeat(' ', $indentLevel);
163 163
                 $str .= sprintf(
164 164
                     'Constant [ %s %s ] { %s }',
165 165
                     gettype($value),
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
             ($isObject ? 'Object of class' : 'Class'),
185 185
             $modifiers,
186 186
             $this->getName(),
187
-            false !== $parentClass ? (' extends ' . $parentClass->getName()) : '',
188
-            $interfaceNames ? (' implements ' . implode(', ', $interfaceNames)) : '',
187
+            false !== $parentClass ? (' extends '.$parentClass->getName()) : '',
188
+            $interfaceNames ? (' implements '.implode(', ', $interfaceNames)) : '',
189 189
             $this->getFileName(),
190 190
             $this->getStartLine(),
191 191
             $this->getEndLine(),
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     {
228 228
         if (!isset($this->constants)) {
229 229
             $this->constants = $this->recursiveCollect(
230
-                function (array &$result, \ReflectionClass $instance) {
230
+                function(array &$result, \ReflectionClass $instance) {
231 231
                     $result += $instance->getConstants();
232 232
                 }
233 233
             );
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
     {
337 337
         if (!isset($this->interfaceClasses)) {
338 338
             $this->interfaceClasses = $this->recursiveCollect(
339
-                function (array &$result, \ReflectionClass $instance) {
339
+                function(array &$result, \ReflectionClass $instance) {
340 340
                     if ($instance->isInterface()) {
341 341
                         $result[$instance->name] = $instance;
342 342
                     }
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         if (!isset($this->methods)) {
378 378
             $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this);
379 379
             $parentMethods = $this->recursiveCollect(
380
-                function (array &$result, \ReflectionClass $instance, $isParent) {
380
+                function(array &$result, \ReflectionClass $instance, $isParent) {
381 381
                     $reflectionMethods = [];
382 382
                     foreach ($instance->getMethods() as $reflectionMethod) {
383 383
                         if (!$isParent || !$reflectionMethod->isPrivate()) {
@@ -448,9 +448,9 @@  discard block
 block discarded – undo
448 448
      */
449 449
     public function getName(): string
450 450
     {
451
-        $namespaceName = $this->namespaceName ? $this->namespaceName . '\\' : '';
451
+        $namespaceName = $this->namespaceName ? $this->namespaceName.'\\' : '';
452 452
 
453
-        return $namespaceName . $this->getShortName();
453
+        return $namespaceName.$this->getShortName();
454 454
     }
455 455
 
456 456
     /**
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
         if (!isset($this->properties)) {
498 498
             $directProperties = ReflectionProperty::collectFromClassNode($this->classLikeNode, $this->getName());
499 499
             $parentProperties = $this->recursiveCollect(
500
-                function (array &$result, \ReflectionClass $instance, $isParent) {
500
+                function(array &$result, \ReflectionClass $instance, $isParent) {
501 501
                     $reflectionProperties = [];
502 502
                     foreach ($instance->getProperties() as $reflectionProperty) {
503 503
                         if (!$isParent || !$reflectionProperty->isPrivate()) {
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
                 $this->getName()
572 572
             );
573 573
             $parentClassConstants = $this->recursiveCollect(
574
-                function (array &$result, \ReflectionClass $instance, $isParent) {
574
+                function(array &$result, \ReflectionClass $instance, $isParent) {
575 575
                     $reflectionClassConstants = [];
576 576
                     foreach ($instance->getReflectionConstants() as $reflectionClassConstant) {
577 577
                         if (!$isParent || !$reflectionClassConstant->isPrivate()) {
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
                         break;
626 626
                     }
627 627
                 }
628
-                $aliases[$adaptation->newName] = $traitName . '::' . $methodName;
628
+                $aliases[$adaptation->newName] = $traitName.'::'.$methodName;
629 629
             }
630 630
         }
631 631
 
Please login to merge, or discard this patch.
src/ReflectionMethod.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
         // }
120 120
 
121 121
         /** @noinspection PhpFormatFunctionParametersMismatchInspection */
122
-       return sprintf(
122
+        return sprintf(
123 123
             "%sMethod [ <user%s%s%s%s>%s%s%s %s method %s ] {\n  @@ %s %d - %d$paramFormat$returnFormat\n}\n",
124 124
             $this->getDocComment() ? $this->getDocComment() . "\n" : '',
125 125
             $inheritance,
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $paramString = '';
110 110
         $indentation = str_repeat(' ', 4);
111 111
         foreach ($methodParameters as $methodParameter) {
112
-            $paramString .= "\n$indentation" . $methodParameter;
112
+            $paramString .= "\n$indentation".$methodParameter;
113 113
         }
114 114
 
115 115
         $inheritance = ''; // todo: this method does not get loaded because somewhere it grabs the wrong Reflection methods
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         /** @noinspection PhpFormatFunctionParametersMismatchInspection */
122 122
        return sprintf(
123 123
             "%sMethod [ <user%s%s%s%s>%s%s%s %s method %s ] {\n  @@ %s %d - %d$paramFormat$returnFormat\n}\n",
124
-            $this->getDocComment() ? $this->getDocComment() . "\n" : '',
124
+            $this->getDocComment() ? $this->getDocComment()."\n" : '',
125 125
             $inheritance,
126 126
             $prototype ? ", overwrites $prototypeClass, prototype $prototypeClass" : '',
127 127
             $this->isConstructor() ? ', ctor' : '',
Please login to merge, or discard this patch.