@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @psalm-suppress RedundantCondition for BC |
| 47 | 47 | */ |
| 48 | - private function getParameterType(ReflectionParameter $parameter, array $paramDoc, string $name): string|null |
|
| 48 | + private function getParameterType(ReflectionParameter $parameter, array $paramDoc, string $name): string | null |
|
| 49 | 49 | { |
| 50 | 50 | /** @phpstan-ignore function.alreadyNarrowedType */ |
| 51 | 51 | $hasType = method_exists($parameter, 'getType') && $parameter->getType(); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | array &$expandedParamNames, |
| 106 | 106 | ): bool { |
| 107 | 107 | $inputAttributes = $parameter->getAttributes(Input::class, ReflectionAttribute::IS_INSTANCEOF); |
| 108 | - if (! $inputAttributes) { |
|
| 108 | + if (!$inputAttributes) { |
|
| 109 | 109 | return false; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $paramDoc[$name]['in'] = $ins[$name]; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - if (! isset($paramDoc[$name])) { |
|
| 139 | + if (!isset($paramDoc[$name])) { |
|
| 140 | 140 | $paramDoc[$name] = []; |
| 141 | 141 | } |
| 142 | 142 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * |
| 150 | 150 | * @return array{0: ParametersMap, 1: RequiredParameterList}|null |
| 151 | 151 | */ |
| 152 | - private function expandInputParameter(ReflectionParameter $parameter): array|null |
|
| 152 | + private function expandInputParameter(ReflectionParameter $parameter): array | null |
|
| 153 | 153 | { |
| 154 | 154 | $constructor = $this->getConstructor($parameter); |
| 155 | 155 | if ($constructor === null) { |
@@ -176,10 +176,10 @@ discard block |
||
| 176 | 176 | /** |
| 177 | 177 | * Get constructor from parameter type if it's a class with constructor |
| 178 | 178 | */ |
| 179 | - private function getConstructor(ReflectionParameter $parameter): ReflectionMethod|null |
|
| 179 | + private function getConstructor(ReflectionParameter $parameter): ReflectionMethod | null |
|
| 180 | 180 | { |
| 181 | 181 | $type = $parameter->getType(); |
| 182 | - if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { |
|
| 182 | + if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) { |
|
| 183 | 183 | return null; |
| 184 | 184 | } |
| 185 | 185 | |
@@ -213,10 +213,10 @@ discard block |
||
| 213 | 213 | /** |
| 214 | 214 | * Get type name from constructor parameter |
| 215 | 215 | */ |
| 216 | - private function getConstructorParamType(ReflectionParameter $ctorParam): string|null |
|
| 216 | + private function getConstructorParamType(ReflectionParameter $ctorParam): string | null |
|
| 217 | 217 | { |
| 218 | 218 | $ctorType = $ctorParam->getType(); |
| 219 | - if (! $ctorType instanceof ReflectionNamedType) { |
|
| 219 | + if (!$ctorType instanceof ReflectionNamedType) { |
|
| 220 | 220 | return null; |
| 221 | 221 | } |
| 222 | 222 | |
@@ -228,9 +228,9 @@ discard block |
||
| 228 | 228 | /** |
| 229 | 229 | * Get default value as string representation |
| 230 | 230 | */ |
| 231 | - private function getDefaultValueString(ReflectionParameter $param): string|null |
|
| 231 | + private function getDefaultValueString(ReflectionParameter $param): string | null |
|
| 232 | 232 | { |
| 233 | - if (! $param->isDefaultValueAvailable() || $param->getDefaultValue() === null) { |
|
| 233 | + if (!$param->isDefaultValueAvailable() || $param->getDefaultValue() === null) { |
|
| 234 | 234 | return null; |
| 235 | 235 | } |
| 236 | 236 | |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | */ |
| 274 | 274 | private function setParameterDefault(array &$paramDoc, ReflectionParameter $parameter): void |
| 275 | 275 | { |
| 276 | - if (! $parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() === null) { |
|
| 276 | + if (!$parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() === null) { |
|
| 277 | 277 | return; |
| 278 | 278 | } |
| 279 | 279 | |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | private function setParameterType(array &$paramDoc, ReflectionParameter $parameter): void |
| 290 | 290 | { |
| 291 | 291 | $type = $this->getParameterType($parameter, $paramDoc, $parameter->name); |
| 292 | - if (! is_string($type)) { |
|
| 292 | + if (!is_string($type)) { |
|
| 293 | 293 | return; |
| 294 | 294 | } |
| 295 | 295 | |