@@ -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 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $typeName = Utils::getTypeName($className); |
| 24 | 24 | $description = $this->getDescription($className); |
| 25 | 25 | |
| 26 | - $fieldGetter = function () use ($className): array { |
|
| 26 | + $fieldGetter = function() use ($className): array { |
|
| 27 | 27 | $factory = new OutputFieldsConfigurationFactory($this->types, $this->entityManager); |
| 28 | 28 | $configuration = $factory->create($className); |
| 29 | 29 | |
@@ -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 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @param ReflectionMethod $method |
| 26 | 26 | * @return array |
| 27 | 27 | */ |
| 28 | - protected function methodToConfiguration(ReflectionMethod $method): ?array |
|
| 28 | + protected function methodToConfiguration(ReflectionMethod $method): ? array |
|
| 29 | 29 | { |
| 30 | 30 | // Silently ignore setter with anything than exactly 1 parameter |
| 31 | 31 | $params = $method->getParameters(); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * All its types will be converted from string to real instance of Type |
| 50 | 50 | * |
| 51 | 51 | * @param ReflectionMethod $method |
| 52 | - * @param Field $field |
|
| 52 | + * @param Input $field |
|
| 53 | 53 | */ |
| 54 | 54 | private function convertTypeDeclarationsToInstances(ReflectionMethod $method, Input $field): void |
| 55 | 55 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * Complete field with info from doc blocks and type hints |
| 61 | 61 | * @param ReflectionMethod $method |
| 62 | 62 | * @param ReflectionParameter $param |
| 63 | - * @param Field $field |
|
| 63 | + * @param Input $field |
|
| 64 | 64 | */ |
| 65 | 65 | private function completeField(ReflectionMethod $method, ReflectionParameter $param, Input $field): void |
| 66 | 66 | { |
@@ -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 | |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Get the description of a method from the doc block |
| 27 | - * @param ReflectionMethod $method |
|
| 28 | 27 | * @return null|string |
| 29 | 28 | */ |
| 30 | 29 | public function getMethodDescription(): ?string |
@@ -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 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param ReflectionMethod $method |
| 28 | 28 | * @return array |
| 29 | 29 | */ |
| 30 | - protected function methodToConfiguration(ReflectionMethod $method): ?array |
|
| 30 | + protected function methodToConfiguration(ReflectionMethod $method): ? array |
|
| 31 | 31 | { |
| 32 | 32 | // Get a field from annotation, or an empty one |
| 33 | 33 | $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\Factory; |
| 6 | 6 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param ReflectionMethod $method |
| 64 | 64 | * @return array |
| 65 | 65 | */ |
| 66 | - abstract protected function methodToConfiguration(ReflectionMethod $method): ?array; |
|
| 66 | + abstract protected function methodToConfiguration(ReflectionMethod $method): ? array; |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * Create a configuration for all fields of Doctrine entity |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * @param bool $isEntityId |
| 143 | 143 | * @return null|Type |
| 144 | 144 | */ |
| 145 | - protected function getTypeFromPhpDeclaration(ReflectionMethod $method, ?string $typeDeclaration, bool $isEntityId = false): ?Type |
|
| 145 | + protected function getTypeFromPhpDeclaration(ReflectionMethod $method, ?string $typeDeclaration, bool $isEntityId = false) : ?Type |
|
| 146 | 146 | { |
| 147 | 147 | if (!$typeDeclaration) { |
| 148 | 148 | return null; |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | * @param null|string $type |
| 263 | 263 | * @throws Exception |
| 264 | 264 | */ |
| 265 | - protected function throwIfArray(ReflectionParameter $param, ?string $type): void |
|
| 265 | + protected function throwIfArray(ReflectionParameter $param, ?string $type) : void |
|
| 266 | 266 | { |
| 267 | 267 | if ($type === 'array') { |
| 268 | 268 | 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.'); |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | * @param Type $type |
| 311 | 311 | * @return Type |
| 312 | 312 | */ |
| 313 | - protected function nonNullIfHasDefault(ReflectionParameter $param, ?Type $type): ?Type |
|
| 313 | + protected function nonNullIfHasDefault(ReflectionParameter $param, ?Type $type) : ?Type |
|
| 314 | 314 | { |
| 315 | 315 | if ($type instanceof NonNull && $param->isDefaultValueAvailable()) { |
| 316 | 316 | return $type->getWrappedType(); |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | * @param Type $type |
| 326 | 326 | * @throws Exception |
| 327 | 327 | */ |
| 328 | - protected function throwIfNotInputType(ReflectionParameter $param, ?Type $type, string $annotation): void |
|
| 328 | + protected function throwIfNotInputType(ReflectionParameter $param, ?Type $type, string $annotation) : void |
|
| 329 | 329 | { |
| 330 | 330 | if (!$type) { |
| 331 | 331 | 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.'); |