@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | $id = strtolower($id); |
30 | 30 | |
31 | - if (! $this->has($id)) { |
|
31 | + if (!$this->has($id)) { |
|
32 | 32 | throw new Error($id . ' is not registered'); |
33 | 33 | } |
34 | 34 |
@@ -18,6 +18,6 @@ |
||
18 | 18 | 'secret', |
19 | 19 | ]; |
20 | 20 | |
21 | - return ! in_array($property, $excludeFields); |
|
21 | + return !in_array($property, $excludeFields); |
|
22 | 22 | } |
23 | 23 | } |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $object = $this->getObject(); |
112 | 112 | $getter = 'get' . $this->getInflector()->classify($this->getCollectionName()); |
113 | 113 | |
114 | - if (! method_exists($object, $getter)) { |
|
114 | + if (!method_exists($object, $getter)) { |
|
115 | 115 | throw new InvalidArgumentException( |
116 | 116 | sprintf( |
117 | 117 | 'The getter %s to access collection %s in object %s does not exist', |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->hydratorFactory = $container->get(HydratorFactory::class); |
66 | 66 | $this->typeManager = $container->get(TypeManager::class); |
67 | 67 | |
68 | - if (! isset($container->get('metadata')[$typeName])) { |
|
68 | + if (!isset($container->get('metadata')[$typeName])) { |
|
69 | 69 | throw new Error( |
70 | 70 | 'Entity ' . $typeName . ' is not mapped in the metadata', |
71 | 71 | ); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass()); |
160 | 160 | |
161 | 161 | foreach ($classMetadata->getFieldNames() as $fieldName) { |
162 | - if (! in_array($fieldName, array_keys($this->metadata['fields']))) { |
|
162 | + if (!in_array($fieldName, array_keys($this->metadata['fields']))) { |
|
163 | 163 | continue; |
164 | 164 | } |
165 | 165 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $classMetadata = $this->entityManager->getClassMetadata($this->getEntityClass()); |
178 | 178 | |
179 | 179 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
180 | - if (! in_array($associationName, array_keys($this->metadata['fields']))) { |
|
180 | + if (!in_array($associationName, array_keys($this->metadata['fields']))) { |
|
181 | 181 | continue; |
182 | 182 | } |
183 | 183 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | case ClassMetadataInfo::MANY_TO_ONE: |
189 | 189 | case ClassMetadataInfo::TO_ONE: |
190 | 190 | $targetEntity = $associationMetadata['targetEntity']; |
191 | - $fields[$associationName] = function () use ($targetEntity) { |
|
191 | + $fields[$associationName] = function() use ($targetEntity) { |
|
192 | 192 | $entity = $this->typeManager->build(self::class, $targetEntity); |
193 | 193 | |
194 | 194 | return [ |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | case ClassMetadataInfo::MANY_TO_MANY: |
202 | 202 | case ClassMetadataInfo::TO_MANY: |
203 | 203 | $targetEntity = $associationMetadata['targetEntity']; |
204 | - $fields[$associationName] = function () use ($targetEntity, $associationName) { |
|
204 | + $fields[$associationName] = function() use ($targetEntity, $associationName) { |
|
205 | 205 | $entity = $this->typeManager->build(self::class, $targetEntity); |
206 | 206 | $shortName = $this->getTypeName() . '_' . $associationName; |
207 | 207 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function get(Entity $entity): Closure |
59 | 59 | { |
60 | - return function ($source, array $args, $context, ResolveInfo $info) { |
|
60 | + return function($source, array $args, $context, ResolveInfo $info) { |
|
61 | 61 | $fieldResolver = $this->fieldResolver; |
62 | 62 | $collection = $fieldResolver($source, $args, $context, $info); |
63 | 63 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | } |
121 | 121 | |
122 | - if (! empty($orderBy)) { |
|
122 | + if (!empty($orderBy)) { |
|
123 | 123 | $criteria->orderBy($orderBy); |
124 | 124 | } |
125 | 125 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | 'cursor' => $cursors['last'], |
228 | 228 | ]; |
229 | 229 | |
230 | - if (! $cursors['first']) { |
|
230 | + if (!$cursors['first']) { |
|
231 | 231 | $cursors['first'] = $cursors['last']; |
232 | 232 | } |
233 | 233 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | $limit = $associationLimit; |
260 | 260 | } |
261 | 261 | |
262 | - if (! $limit) { |
|
262 | + if (!$limit) { |
|
263 | 263 | $limit = $this->config->getLimit(); |
264 | 264 | } |
265 | 265 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $offset = 0; |
281 | 281 | } |
282 | 282 | |
283 | - if ($paginationFields['last'] && ! $paginationFields['before']) { |
|
283 | + if ($paginationFields['last'] && !$paginationFields['before']) { |
|
284 | 284 | $offset = $itemCount - $paginationFields['last']; |
285 | 285 | } |
286 | 286 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string |
23 | 23 | { |
24 | 24 | // @codeCoverageIgnoreStart |
25 | - if (! $valueNode instanceof StringValueNode) { |
|
25 | + if (!$valueNode instanceof StringValueNode) { |
|
26 | 26 | throw new Error('Query error: Uuid can only parse strings got: ' . $valueNode->kind, $valueNode); |
27 | 27 | } |
28 | 28 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | return $value; |
38 | 38 | } |
39 | 39 | |
40 | - if (! preg_match('/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/', $value)) { |
|
40 | + if (!preg_match('/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/', $value)) { |
|
41 | 41 | throw new Error('Uuid is invalid.'); |
42 | 42 | } |
43 | 43 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string |
23 | 23 | { |
24 | 24 | // @codeCoverageIgnoreStart |
25 | - if (! $valueNode instanceof StringValueNode) { |
|
25 | + if (!$valueNode instanceof StringValueNode) { |
|
26 | 26 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
27 | 27 | } |
28 | 28 | |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | public function parseValue(mixed $value): PHPDateTime|false |
35 | 35 | { |
36 | - if (! is_string($value)) { |
|
36 | + if (!is_string($value)) { |
|
37 | 37 | throw new Error('Time is not a string: ' . $value); |
38 | 38 | } |
39 | 39 | |
40 | - if (! preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) { |
|
40 | + if (!preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) { |
|
41 | 41 | throw new Error('Time ' . $value . ' format does not match H:i:s.u e.g. 13:34:40.867530'); |
42 | 42 | } |
43 | 43 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string |
23 | 23 | { |
24 | 24 | // @codeCoverageIgnoreStart |
25 | - if (! $valueNode instanceof StringValueNode) { |
|
25 | + if (!$valueNode instanceof StringValueNode) { |
|
26 | 26 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
27 | 27 | } |
28 | 28 | |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function parseValue(mixed $value): PHPDateTime |
38 | 38 | { |
39 | - if (! is_string($value)) { |
|
39 | + if (!is_string($value)) { |
|
40 | 40 | throw new Error('Time is not a string: ' . $value); |
41 | 41 | } |
42 | 42 | |
43 | - if (! preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) { |
|
43 | + if (!preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) { |
|
44 | 44 | throw new Error('Time ' . $value . ' format does not match H:i:s.u e.g. 13:34:40.867530'); |
45 | 45 | } |
46 | 46 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string |
22 | 22 | { |
23 | 23 | // @codeCoverageIgnoreStart |
24 | - if (! $valueNode instanceof StringValueNode) { |
|
24 | + if (!$valueNode instanceof StringValueNode) { |
|
25 | 25 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
26 | 26 | } |
27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | public function parseValue(mixed $value): PHPDateTime |
34 | 34 | { |
35 | - if (! is_string($value)) { |
|
35 | + if (!is_string($value)) { |
|
36 | 36 | throw new Error('datetime is not a string: ' . $value); |
37 | 37 | } |
38 | 38 |