@@ -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 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | return new LazyParserType($attribute->type, $attribute->mode ?? 0, $this->typeRegistry); |
84 | 84 | } |
85 | 85 | |
86 | - if (! $parameter->hasType()) { |
|
86 | + if (!$parameter->hasType()) { |
|
87 | 87 | throw new CantResolveGraphQLTypeException(\sprintf( |
88 | 88 | 'Can\'t resolve GraphQL type for argument "%s"', |
89 | 89 | $parameter->getName() |
@@ -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 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | return new Webonyx\EnumType([ |
167 | 167 | 'name' => $type->getName(), |
168 | 168 | 'description' => $type->getDescription(), |
169 | - 'values' => static function () use ($type): iterable { |
|
169 | + 'values' => static function() use ($type): iterable { |
|
170 | 170 | foreach ($type->getValues() as $value) { |
171 | 171 | yield $value->getName() => [ |
172 | 172 | 'name' => $value->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 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | return new LazyTypeResolver($this->container->get($attribute->resolveType), $this->typeRegistry); |
164 | 164 | } |
165 | 165 | |
166 | - if (! $class->isInterface() && $class->isSubclassOf(ResolveTypeAwareInterface::class)) { |
|
166 | + if (!$class->isInterface() && $class->isSubclassOf(ResolveTypeAwareInterface::class)) { |
|
167 | 167 | return new LazyTypeResolver($class->getMethod('resolveType')->getClosure(), $this->typeRegistry); |
168 | 168 | } |
169 | 169 |
@@ -89,11 +89,11 @@ discard block |
||
89 | 89 | return $this; |
90 | 90 | } |
91 | 91 | |
92 | - private function getObjectField(int|string $name, string|array $field): AbstractObjectField |
|
92 | + private function getObjectField(int | string $name, string | array $field): AbstractObjectField |
|
93 | 93 | { |
94 | 94 | $fieldName = $field['name'] ?? $name; |
95 | 95 | |
96 | - if (! \is_string($fieldName)) { |
|
96 | + if (!\is_string($fieldName)) { |
|
97 | 97 | throw new CantResolveObjectFieldException( |
98 | 98 | 'Can\'t resolve ObjectField: wrong configuration - undefined name', |
99 | 99 | ); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return $this->makeObjectField($fieldName, ['type' => $field]); |
104 | 104 | } |
105 | 105 | |
106 | - if (! isset($field['type']) || ! \is_string($field['type'])) { |
|
106 | + if (!isset($field['type']) || !\is_string($field['type'])) { |
|
107 | 107 | throw new CantResolveObjectFieldException( |
108 | 108 | 'Can\'t resolve ObjectField: wrong configuration - undefined type', |
109 | 109 | ); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | |
179 | 179 | if (\is_array($callable)) { |
180 | - if (! isset($callable[0], $callable[1])) { |
|
180 | + if (!isset($callable[0], $callable[1])) { |
|
181 | 181 | throw new CantResolveObjectFieldException(\sprintf( |
182 | 182 | 'Can\'t resolve ObjectField: wrong configuration - %s must be callable', |
183 | 183 | $option |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | return $this; |
74 | 74 | } |
75 | 75 | |
76 | - private function getObjectField(int|string $name, string|array $field): AbstractObjectField |
|
76 | + private function getObjectField(int | string $name, string | array $field): AbstractObjectField |
|
77 | 77 | { |
78 | 78 | $fieldName = $field['name'] ?? $name; |
79 | 79 | |
80 | - if (! \is_string($fieldName)) { |
|
80 | + if (!\is_string($fieldName)) { |
|
81 | 81 | throw new CantResolveObjectFieldException( |
82 | 82 | 'Can\'t resolve ObjectField: wrong configuration - undefined name', |
83 | 83 | ); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | return $this->makeObjectField($fieldName, ['type' => $field]); |
88 | 88 | } |
89 | 89 | |
90 | - if (! isset($field['type']) || ! \is_string($field['type'])) { |
|
90 | + if (!isset($field['type']) || !\is_string($field['type'])) { |
|
91 | 91 | throw new CantResolveObjectFieldException( |
92 | 92 | 'Can\'t resolve ObjectField: wrong configuration - undefined type', |
93 | 93 | ); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | yield $value; |
34 | 34 | } elseif (\is_array($value)) { |
35 | 35 | $valueName = $value['name'] ?? $name; |
36 | - if (! \is_string($valueName)) { |
|
36 | + if (!\is_string($valueName)) { |
|
37 | 37 | throw new CantResolveEnumTypeException('Can\'t resolve EnumValue: wrong value configuration'); |
38 | 38 | } |
39 | 39 | yield new EnumValue( |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | public function process(mixed $field, InputObjectFieldResolverInterface $fieldResolver): Webonyx\InputObjectField |
35 | 35 | { |
36 | - if (! $field instanceof ReflectionMethodWithAttribute) { |
|
36 | + if (!$field instanceof ReflectionMethodWithAttribute) { |
|
37 | 37 | return $fieldResolver->resolve($field); |
38 | 38 | } |
39 | 39 | |
40 | - if (! $field->attribute instanceof InputObjectField) { |
|
40 | + if (!$field->attribute instanceof InputObjectField) { |
|
41 | 41 | return $fieldResolver->resolve($field); |
42 | 42 | } |
43 | 43 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $parameter = $parameters[0]; |
96 | 96 | |
97 | - if (! $parameter->hasType()) { |
|
97 | + if (!$parameter->hasType()) { |
|
98 | 98 | throw new CantResolveGraphQLTypeException(\sprintf( |
99 | 99 | 'Can\'t resolve GraphQL type "%s" for field "%s". Parameter has no type.', |
100 | 100 | $method->getDeclaringClass()->getName(), |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | |
40 | 40 | public function process(mixed $field, ObjectFieldResolverInterface $fieldResolver): Webonyx\FieldDefinition |
41 | 41 | { |
42 | - if (! $field instanceof ReflectionMethodWithAttribute) { |
|
42 | + if (!$field instanceof ReflectionMethodWithAttribute) { |
|
43 | 43 | return $fieldResolver->resolve($field); |
44 | 44 | } |
45 | 45 | |
46 | - if (! $field->attribute instanceof $this->targetAttribute) { |
|
46 | + if (!$field->attribute instanceof $this->targetAttribute) { |
|
47 | 47 | return $fieldResolver->resolve($field); |
48 | 48 | } |
49 | 49 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return new LazyParserType($attribute->type, $attribute->mode ?? 0, $this->typeRegistry); |
93 | 93 | } |
94 | 94 | |
95 | - if (! $method->hasReturnType()) { |
|
95 | + if (!$method->hasReturnType()) { |
|
96 | 96 | throw new CantResolveGraphQLTypeException(\sprintf( |
97 | 97 | 'Can\'t resolve GraphQL type for field "%s"', |
98 | 98 | $method->getName() |