@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function resolve(mixed $argument): Webonyx\InputObjectField |
| 24 | 24 | { |
| 25 | - if (! isset($this->queue)) { |
|
| 25 | + if (!isset($this->queue)) { |
|
| 26 | 26 | throw new NextHandlerIsEmptyException('Cannot invoke pipeline resolver more than once'); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | if ($this->typeRegistry->has($name)) { |
| 83 | 83 | $gqlType = $this->typeRegistry->get($name); |
| 84 | 84 | |
| 85 | - if (! $gqlType instanceof Webonyx\ObjectType) { |
|
| 85 | + if (!$gqlType instanceof Webonyx\ObjectType) { |
|
| 86 | 86 | throw new CantResolveGraphQLTypeException('UnionType must contains only ObjectTypes'); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function __invoke(mixed $value, mixed $context, ResolveInfo $info): ?Webonyx\ObjectType |
| 19 | 19 | { |
| 20 | - if (! is_object($value)) { |
|
| 20 | + if (!is_object($value)) { |
|
| 21 | 21 | return null; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | trait DefinitionAwareTrait |
| 12 | 12 | { |
| 13 | - private function getTypeName(ReflectionClass $class, Attribute\AbstractType|null $attribute): string |
|
| 13 | + private function getTypeName(ReflectionClass $class, Attribute\AbstractType | null $attribute): string |
|
| 14 | 14 | { |
| 15 | 15 | return $attribute?->name ?? $class->getShortName(); |
| 16 | 16 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function resolve(mixed $field): Webonyx\FieldDefinition |
| 24 | 24 | { |
| 25 | - if (! isset($this->queue)) { |
|
| 25 | + if (!isset($this->queue)) { |
|
| 26 | 26 | throw new NextHandlerIsEmptyException('Cannot invoke pipeline resolver more than once'); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | public function process(mixed $field, ObjectFieldResolverInterface $fieldResolver): Webonyx\FieldDefinition |
| 28 | 28 | { |
| 29 | - if (! $field instanceof ObjectFieldInterface) { |
|
| 29 | + if (!$field instanceof ObjectFieldInterface) { |
|
| 30 | 30 | return $fieldResolver->resolve($field); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -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, $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, $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() |
@@ -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 | |