@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace GraphQL\Doctrine; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace GraphQL\Doctrine\Factory; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace GraphQL\Doctrine\Factory; |
| 6 | 6 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @return null|array |
| 69 | 69 | */ |
| 70 | - abstract protected function methodToConfiguration(ReflectionMethod $method): ?array; |
|
| 70 | + abstract protected function methodToConfiguration(ReflectionMethod $method): ? array; |
|
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * Create a configuration for all fields of Doctrine entity |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * |
| 153 | 153 | * @return null|Type |
| 154 | 154 | */ |
| 155 | - protected function getTypeFromPhpDeclaration(ReflectionMethod $method, ?string $typeDeclaration, bool $isEntityId = false): ?Type |
|
| 155 | + protected function getTypeFromPhpDeclaration(ReflectionMethod $method, ?string $typeDeclaration, bool $isEntityId = false) : ?Type |
|
| 156 | 156 | { |
| 157 | 157 | if (!$typeDeclaration) { |
| 158 | 158 | return null; |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | * |
| 285 | 285 | * @throws Exception |
| 286 | 286 | */ |
| 287 | - protected function throwIfArray(ReflectionParameter $param, ?string $type): void |
|
| 287 | + protected function throwIfArray(ReflectionParameter $param, ?string $type) : void |
|
| 288 | 288 | { |
| 289 | 289 | if ($type === 'array') { |
| 290 | 290 | throw new Exception('The parameter `$' . $param->getName() . '` on method ' . $this->getMethodFullName($param->getDeclaringFunction()) . ' is type hinted as `array` and is not overriden via `@API\Argument` annotation. Either change the type hint or specify the type with `@API\Argument` annotation.'); |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | * |
| 341 | 341 | * @return Type |
| 342 | 342 | */ |
| 343 | - protected function nonNullIfHasDefault(ReflectionParameter $param, ?Type $type): ?Type |
|
| 343 | + protected function nonNullIfHasDefault(ReflectionParameter $param, ?Type $type) : ?Type |
|
| 344 | 344 | { |
| 345 | 345 | if ($type instanceof NonNull && $param->isDefaultValueAvailable()) { |
| 346 | 346 | return $type->getWrappedType(); |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | * |
| 358 | 358 | * @throws Exception |
| 359 | 359 | */ |
| 360 | - protected function throwIfNotInputType(ReflectionParameter $param, ?Type $type, string $annotation): void |
|
| 360 | + protected function throwIfNotInputType(ReflectionParameter $param, ?Type $type, string $annotation) : void |
|
| 361 | 361 | { |
| 362 | 362 | if (!$type) { |
| 363 | 363 | throw new Exception('Could not find type for parameter `$' . $param->name . '` for method ' . $this->getMethodFullName($param->getDeclaringFunction()) . '. Either type hint the parameter, or specify the type with `@API\\' . $annotation . '` annotation.'); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace GraphQL\Doctrine\Factory; |
| 6 | 6 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return null|array |
| 29 | 29 | */ |
| 30 | - protected function methodToConfiguration(ReflectionMethod $method): ?array |
|
| 30 | + protected function methodToConfiguration(ReflectionMethod $method): ? array |
|
| 31 | 31 | { |
| 32 | 32 | // Silently ignore setter with anything than exactly 1 parameter |
| 33 | 33 | $params = $method->getParameters(); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace GraphQL\Doctrine\Factory; |
| 6 | 6 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @return null|array |
| 31 | 31 | */ |
| 32 | - protected function methodToConfiguration(ReflectionMethod $method): ?array |
|
| 32 | + protected function methodToConfiguration(ReflectionMethod $method): ? array |
|
| 33 | 33 | { |
| 34 | 34 | // Get a field from annotation, or an empty one |
| 35 | 35 | $field = $this->getAnnotationReader()->getMethodAnnotation($method, Field::class) ?? new Field(); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace GraphQL\Doctrine; |
| 6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return mixed |
| 41 | 41 | */ |
| 42 | - private function resolveObject($source, ?array $args, string $fieldName) |
|
| 42 | + private function resolveObject($source, ? array $args, string $fieldName) |
|
| 43 | 43 | { |
| 44 | 44 | $getter = $this->getGetter($source, $fieldName); |
| 45 | 45 | if ($getter) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * |
| 102 | 102 | * @return array |
| 103 | 103 | */ |
| 104 | - private function orderArguments(ReflectionMethod $method, ?array $args): array |
|
| 104 | + private function orderArguments(ReflectionMethod $method, ? array $args) : array |
|
| 105 | 105 | { |
| 106 | 106 | $result = []; |
| 107 | 107 | foreach ($method->getParameters() as $param) { |