@@ -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 | |
@@ -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(), |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function resolve(mixed $type): Webonyx\Type |
| 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 | |
@@ -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 | |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | return $this; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - private function getObjectField(int|string $name, string|array $field): AbstractObjectField |
|
| 69 | + private function getObjectField(int | string $name, string | array $field): AbstractObjectField |
|
| 70 | 70 | { |
| 71 | 71 | $fieldName = $field['name'] ?? $name; |
| 72 | 72 | |
| 73 | - if (! is_string($fieldName)) { |
|
| 73 | + if (!is_string($fieldName)) { |
|
| 74 | 74 | throw new CantResolveObjectFieldException( |
| 75 | 75 | 'Can\'t resolve ObjectField: wrong configuration - undefined name', |
| 76 | 76 | ); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | if (is_array($field)) { |
| 84 | - if (! isset($field['type']) || ! is_string($field['type'])) { |
|
| 84 | + if (!isset($field['type']) || !is_string($field['type'])) { |
|
| 85 | 85 | throw new CantResolveObjectFieldException( |
| 86 | 86 | 'Can\'t resolve ObjectField: wrong configuration - undefined type', |
| 87 | 87 | ); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | if (is_array($callable)) { |
| 158 | - if (! isset($callable[0], $callable[1])) { |
|
| 158 | + if (!isset($callable[0], $callable[1])) { |
|
| 159 | 159 | throw new CantResolveObjectFieldException(sprintf( |
| 160 | 160 | 'Can\'t resolve ObjectField: wrong configuration - %s must be callable', |
| 161 | 161 | $option |
@@ -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( |