Completed
Pull Request — master (#130)
by Abdul Malik
24:41
created
src/ReflectionParameter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     public function __debugInfo(): array
128 128
     {
129 129
         return [
130
-            'name' => (string)$this->parameterNode->var->name,
130
+            'name' => (string) $this->parameterNode->var->name,
131 131
         ];
132 132
     }
133 133
 
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
             'Parameter #%d [ %s %s%s%s$%s%s ]',
168 168
             $this->parameterIndex,
169 169
             $isOptional ? '<optional>' : '<required>',
170
-            $parameterType ? ReflectionType::convertToDisplayType($parameterType) . ' ' : '',
170
+            $parameterType ? ReflectionType::convertToDisplayType($parameterType).' ' : '',
171 171
             $this->isVariadic() ? '...' : '',
172 172
             $this->isPassedByReference() ? '&' : '',
173 173
             $this->getName(),
174
-            ($isOptional && $hasDefaultValue) ? (' = ' . $defaultValue) : ''
174
+            ($isOptional && $hasDefaultValue) ? (' = '.$defaultValue) : ''
175 175
         );
176 176
     }
177 177
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     /**
272 272
      * {@inheritDoc}
273 273
      */
274
-    public function getDefaultValueConstantName(): null|string
274
+    public function getDefaultValueConstantName(): null | string
275 275
     {
276 276
         if (!$this->isDefaultValueAvailable()) {
277 277
             throw new ReflectionException('Internal error: Failed to retrieve the default value');
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     public function getName(): string
287 287
     {
288
-        return (string)$this->parameterNode->var->name;
288
+        return (string) $this->parameterNode->var->name;
289 289
     }
290 290
 
291 291
     /**
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public function isDefaultValueAvailable(): bool
359 359
     {
360
-        if (! isset($this->parameterNode->default)) {
360
+        if (!isset($this->parameterNode->default)) {
361 361
             return false;
362 362
         }
363 363
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         // see https://github.com/php/php-src/issues/8090
366 366
         $parameters = $this->declaringFunction->getNode()->getParams();
367 367
         for ($key = $this->parameterIndex + 1; $key < count($parameters); ++$key) {
368
-            if (! $parameters[$key]->default instanceof Expr) {
368
+            if (!$parameters[$key]->default instanceof Expr) {
369 369
                 return false;
370 370
             }
371 371
         }
Please login to merge, or discard this patch.
src/ReflectionAttribute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 {
30 30
     public function __construct(
31 31
         private string $attributeName,
32
-        private ReflectionClass|ReflectionMethod|ReflectionProperty|ReflectionClassConstant|ReflectionFunction|ReflectionParameter $reflector,
32
+        private ReflectionClass | ReflectionMethod | ReflectionProperty | ReflectionClassConstant | ReflectionFunction | ReflectionParameter $reflector,
33 33
         private array $arguments,
34 34
         private bool $isRepeated,
35 35
     ) {
Please login to merge, or discard this patch.