Completed
Pull Request — master (#81)
by Loren
02:42
created
src/ReflectionMethod.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,12 +95,12 @@
 block discarded – undo
95 95
         $paramString = '';
96 96
         $identation  = str_repeat(' ', 4);
97 97
         foreach ($methodParameters as $methodParameter) {
98
-            $paramString .= "\n{$identation}" . $methodParameter;
98
+            $paramString .= "\n{$identation}".$methodParameter;
99 99
         }
100 100
 
101 101
         return sprintf(
102 102
             "%sMethod [ <user%s%s%s>%s%s%s %s method %s ] {\n  @@ %s %d - %d{$paramFormat}{$returnFormat}\n}\n",
103
-            $this->getDocComment() ? $this->getDocComment() . "\n" : '',
103
+            $this->getDocComment() ? $this->getDocComment()."\n" : '',
104 104
             $prototype ? ", overwrites {$prototypeClass}, prototype {$prototypeClass}" : '',
105 105
             $this->isConstructor() ? ', ctor' : '',
106 106
             $this->isDestructor() ? ', dtor' : '',
Please login to merge, or discard this patch.
src/ReflectionType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 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
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function wasIncluded()
109 109
     {
110 110
         return
111
-            $this->isBuiltin()                   ||
111
+            $this->isBuiltin() ||
112 112
             interface_exists($this->type, false) ||
113 113
             trait_exists($this->type, false) ||
114 114
             class_exists($this->type, false);
Please login to merge, or discard this patch.
src/Traits/ReflectionClassLikeTrait.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -134,17 +134,17 @@  discard block
 block discarded – undo
134 134
             }
135 135
         }
136 136
 
137
-        $buildString = function (array $items, $indentLevel = 4) {
137
+        $buildString = function(array $items, $indentLevel = 4) {
138 138
             if (!count($items)) {
139 139
                 return '';
140 140
             }
141
-            $indent = "\n" . str_repeat(' ', $indentLevel);
142
-            return $indent . implode($indent, explode("\n", implode("\n", $items)));
141
+            $indent = "\n".str_repeat(' ', $indentLevel);
142
+            return $indent.implode($indent, explode("\n", implode("\n", $items)));
143 143
         };
144
-        $buildConstants = function (array $items, $indentLevel = 4) {
144
+        $buildConstants = function(array $items, $indentLevel = 4) {
145 145
             $str = '';
146 146
             foreach ($items as $name => $value) {
147
-                $str .= "\n" . str_repeat(' ', $indentLevel);
147
+                $str .= "\n".str_repeat(' ', $indentLevel);
148 148
                 $str .= sprintf(
149 149
                     'Constant [ %s %s ] { %s }',
150 150
                     gettype($value),
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
             ($isObject ? 'Object of class' : 'Class'),
169 169
             $modifiers,
170 170
             $this->getName(),
171
-            false !== $parentClass ? (' extends ' . $parentClass->getName()) : '',
172
-            $interfaceNames ? (' implements ' . implode(', ', $interfaceNames)) : '',
171
+            false !== $parentClass ? (' extends '.$parentClass->getName()) : '',
172
+            $interfaceNames ? (' implements '.implode(', ', $interfaceNames)) : '',
173 173
             $this->getFileName(),
174 174
             $this->getStartLine(),
175 175
             $this->getEndLine(),
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         if (!isset($this->constants)) {
212 212
             if ($this->classLikeNode) {
213
-                $this->constants = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance) {
213
+                $this->constants = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance) {
214 214
                     $result += $instance->getConstants();
215 215
                 });
216 216
                 $this->collectSelfConstants();
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         $staticOrder   = [true, false];
257 257
         foreach ($staticOrder as $shouldBeStatic) {
258 258
             foreach ($properties as $property) {
259
-                $isStaticProperty     = $property->isStatic();
259
+                $isStaticProperty = $property->isStatic();
260 260
                 if ($shouldBeStatic !== $isStaticProperty) {
261 261
                     continue;
262 262
                 }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     {
348 348
         if (!isset($this->interfaceClasses)) {
349 349
             if ($this->classLikeNode) {
350
-                $this->interfaceClasses = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance) {
350
+                $this->interfaceClasses = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance) {
351 351
                     if ($instance->isInterface()) {
352 352
                         $result[$instance->name] = $instance;
353 353
                     }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         if (!isset($this->methods)) {
395 395
             if ($this->classLikeNode) {
396 396
                 $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this);
397
-                $parentMethods = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) {
397
+                $parentMethods = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) {
398 398
                     $reflectionMethods = [];
399 399
                     foreach ($instance->getMethods() as $reflectionMethod) {
400 400
                         if (!$isParent || !$reflectionMethod->isPrivate()) {
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
      */
480 480
     public function getName()
481 481
     {
482
-        $namespaceName = $this->namespaceName ? $this->namespaceName . '\\' : '';
482
+        $namespaceName = $this->namespaceName ? $this->namespaceName.'\\' : '';
483 483
 
484
-        return $namespaceName . $this->getShortName();
484
+        return $namespaceName.$this->getShortName();
485 485
     }
486 486
 
487 487
     /**
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
         if (!isset($this->properties)) {
536 536
             if ($this->classLikeNode) {
537 537
                 $directProperties = ReflectionProperty::collectFromClassNode($this->classLikeNode, $this->getName());
538
-                $parentProperties = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) {
538
+                $parentProperties = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) {
539 539
                     $reflectionProperties = [];
540 540
                     foreach ($instance->getProperties() as $reflectionProperty) {
541 541
                         if (!$isParent || !$reflectionProperty->isPrivate()) {
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                         break;
635 635
                     }
636 636
                 }
637
-                $aliases[$adaptation->newName] = $traitName . '::'. $methodName;
637
+                $aliases[$adaptation->newName] = $traitName.'::'.$methodName;
638 638
             }
639 639
         }
640 640
 
Please login to merge, or discard this patch.