@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ? new \ReflectionClass($type) |
| 54 | 54 | : $type; |
| 55 | 55 | |
| 56 | - if (! $class instanceof \ReflectionClass) { |
|
| 56 | + if (!$class instanceof \ReflectionClass) { |
|
| 57 | 57 | return $typeResolver->resolve($type); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | private function getResolveTypeFn(\ReflectionClass $class, ?Attribute\InterfaceType $attribute): callable |
| 161 | 161 | { |
| 162 | - if (! $class->isInterface() && $class->isSubclassOf(ResolveTypeAwareInterface::class)) { |
|
| 162 | + if (!$class->isInterface() && $class->isSubclassOf(ResolveTypeAwareInterface::class)) { |
|
| 163 | 163 | return new LazyTypeResolver($class->getMethod('resolveType')->getClosure(), $this->typeRegistry); |
| 164 | 164 | } |
| 165 | 165 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | public function process(mixed $type, TypeResolverInterface $typeResolver): Webonyx\Type |
| 42 | 42 | { |
| 43 | - if (! is_string($type) || ! is_subclass_of($type, TypeInterface::class)) { |
|
| 43 | + if (!is_string($type) || !is_subclass_of($type, TypeInterface::class)) { |
|
| 44 | 44 | return $typeResolver->resolve($type); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | return new Webonyx\EnumType([ |
| 161 | 161 | 'name' => $type->getName(), |
| 162 | 162 | 'description' => $type->getDescription(), |
| 163 | - 'values' => static function () use ($type): iterable { |
|
| 163 | + 'values' => static function() use ($type): iterable { |
|
| 164 | 164 | foreach ($type->getValues() as $value) { |
| 165 | 165 | yield $value->getName() => [ |
| 166 | 166 | 'name' => $value->getName(), |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | private function extract(array $config, string $class): mixed |
| 25 | 25 | { |
| 26 | - if (! isset($config['name'], $config['type'])) { |
|
| 26 | + if (!isset($config['name'], $config['type'])) { |
|
| 27 | 27 | return $config; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | yield $value; |
| 33 | 33 | } elseif (is_array($value)) { |
| 34 | 34 | $valueName = $value['name'] ?? $name; |
| 35 | - if (! is_string($valueName)) { |
|
| 35 | + if (!is_string($valueName)) { |
|
| 36 | 36 | throw new CantResolveEnumTypeException('Can\'t resolve EnumValue: wrong value configuration'); |
| 37 | 37 | } |
| 38 | 38 | yield new EnumValue( |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function process(mixed $argument, ArgumentResolverInterface $argumentResolver): array |
| 29 | 29 | { |
| 30 | - if (! $argument instanceof ReflectionParameter) { |
|
| 30 | + if (!$argument instanceof ReflectionParameter) { |
|
| 31 | 31 | return $argumentResolver->resolve($argument); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | return new LazyParserType($attribute->type, $attribute->mode ?? 0, $this->typeRegistry); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if (! $parameter->hasType()) { |
|
| 87 | + if (!$parameter->hasType()) { |
|
| 88 | 88 | throw new CantResolveGraphQLTypeException(sprintf( |
| 89 | 89 | 'Can\'t resolve GraphQL type for argument "%s"', |
| 90 | 90 | $parameter->getName() |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | public function process(mixed $field, InputObjectFieldResolverInterface $fieldResolver): Webonyx\InputObjectField |
| 31 | 31 | { |
| 32 | - if (! $field instanceof ReflectionProperty) { |
|
| 32 | + if (!$field instanceof ReflectionProperty) { |
|
| 33 | 33 | return $fieldResolver->resolve($field); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | return new LazyParserType($attribute->type, $attribute->mode ?? 0, $this->typeRegistry); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if (! $property->hasType()) { |
|
| 86 | + if (!$property->hasType()) { |
|
| 87 | 87 | throw new CantResolveGraphQLTypeException(sprintf( |
| 88 | 88 | 'Can\'t resolve GraphQL type for field "%s"', |
| 89 | 89 | $property->getName() |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | public function __invoke(): Webonyx\Type |
| 29 | 29 | { |
| 30 | - if (! $this->typeRegistry->has($this->type)) { |
|
| 30 | + if (!$this->typeRegistry->has($this->type)) { |
|
| 31 | 31 | return $this->getType(Parser::parseType($this->type)); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | public function process(mixed $field, ObjectFieldResolverInterface $fieldResolver): Webonyx\FieldDefinition |
| 31 | 31 | { |
| 32 | - if (! $field instanceof ReflectionProperty) { |
|
| 32 | + if (!$field instanceof ReflectionProperty) { |
|
| 33 | 33 | return $fieldResolver->resolve($field); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | return new LazyParserType($attribute->type, $attribute->mode ?? 0, $this->typeRegistry); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if (! $property->hasType()) { |
|
| 83 | + if (!$property->hasType()) { |
|
| 84 | 84 | throw new CantResolveGraphQLTypeException(sprintf( |
| 85 | 85 | 'Can\'t resolve GraphQL type for field "%s"', |
| 86 | 86 | $property->getName() |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | private function getFieldResolver(ReflectionProperty $property): callable |
| 98 | 98 | { |
| 99 | - return static function ($object) use ($property): mixed { |
|
| 99 | + return static function($object) use ($property): mixed { |
|
| 100 | 100 | return $property->getValue($object); |
| 101 | 101 | }; |
| 102 | 102 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function process(mixed $field, ObjectFieldResolverInterface $fieldResolver): Webonyx\FieldDefinition |
| 36 | 36 | { |
| 37 | - if (! $field instanceof ReflectionMethod) { |
|
| 37 | + if (!$field instanceof ReflectionMethod) { |
|
| 38 | 38 | return $fieldResolver->resolve($field); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | return new LazyParserType($attribute->type, $attribute->mode ?? 0, $this->typeRegistry); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (! $method->hasReturnType()) { |
|
| 92 | + if (!$method->hasReturnType()) { |
|
| 93 | 93 | throw new CantResolveGraphQLTypeException(sprintf( |
| 94 | 94 | 'Can\'t resolve GraphQL type for field "%s"', |
| 95 | 95 | $method->getName() |