Passed
Push — master ( ab80eb...29f471 )
by Andrey
03:08
created
src/ArgumentResolver/Middleware/ReflectionParameterMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.
src/TypeResolver/Middleware/GraphQLTypeMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(),
Please login to merge, or discard this patch.
src/TypeResolver/Middleware/AttributedGraphQLTypeMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Type/AbstractObjectType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Type/AbstractInterfaceType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             );
Please login to merge, or discard this patch.
src/Type/AbstractEnumType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/InputObjectFieldResolver/Middleware/ReflectionMethodMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(),
Please login to merge, or discard this patch.
Middleware/AbstractFieldByReflectionMethodMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.