@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeTZ |
25 | 25 | { |
26 | 26 | // @codeCoverageIgnoreStart |
27 | - if (! $valueNode instanceof StringValueNode) { |
|
27 | + if (!$valueNode instanceof StringValueNode) { |
|
28 | 28 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
29 | 29 | } |
30 | 30 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function parseValue(mixed $value): PHPDateTimeTZ |
37 | 37 | { |
38 | - if (! is_string($value)) { |
|
38 | + if (!is_string($value)) { |
|
39 | 39 | throw new Error('datetimetz is not a string: ' . $value); |
40 | 40 | } |
41 | 41 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): DateTime|null |
25 | 25 | { |
26 | 26 | // @codeCoverageIgnoreStart |
27 | - if (! $valueNode instanceof StringValueNode) { |
|
27 | + if (!$valueNode instanceof StringValueNode) { |
|
28 | 28 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
29 | 29 | } |
30 | 30 | |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | |
36 | 36 | public function parseValue(mixed $value): DateTime |
37 | 37 | { |
38 | - if (! is_string($value)) { |
|
38 | + if (!is_string($value)) { |
|
39 | 39 | throw new Error('Date is not a string: ' . $value); |
40 | 40 | } |
41 | 41 | |
42 | - if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) { |
|
42 | + if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) { |
|
43 | 43 | throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.'); |
44 | 44 | } |
45 | 45 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | throw new Error('Expected DateTime object. Got string.'); |
53 | 53 | } |
54 | 54 | |
55 | - if (! $value instanceof DateTime) { |
|
55 | + if (!$value instanceof DateTime) { |
|
56 | 56 | throw new Error('Expected DateTime object. Got ' . $value::class); |
57 | 57 | } |
58 | 58 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTime |
25 | 25 | { |
26 | 26 | // @codeCoverageIgnoreStart |
27 | - if (! $valueNode instanceof StringValueNode) { |
|
27 | + if (!$valueNode instanceof StringValueNode) { |
|
28 | 28 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
29 | 29 | } |
30 | 30 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function parseValue(mixed $value): PHPDateTime |
37 | 37 | { |
38 | - if (! is_string($value)) { |
|
38 | + if (!is_string($value)) { |
|
39 | 39 | throw new Error('datetime is not a string: ' . $value); |
40 | 40 | } |
41 | 41 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeImmutable |
25 | 25 | { |
26 | 26 | // @codeCoverageIgnoreStart |
27 | - if (! $valueNode instanceof StringValueNode) { |
|
27 | + if (!$valueNode instanceof StringValueNode) { |
|
28 | 28 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
29 | 29 | } |
30 | 30 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function parseValue(mixed $value): PHPDateTimeImmutable |
37 | 37 | { |
38 | - if (! is_string($value)) { |
|
38 | + if (!is_string($value)) { |
|
39 | 39 | throw new Error('datetime_immutable is not a string: ' . $value); |
40 | 40 | } |
41 | 41 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | public function get(Entity $entity): Closure |
46 | 46 | { |
47 | - return function ($source, array $args, $context, ResolveInfo $info) use ($entity) { |
|
47 | + return function($source, array $args, $context, ResolveInfo $info) use ($entity) { |
|
48 | 48 | $fieldResolver = $this->fieldResolver; |
49 | 49 | $collection = $fieldResolver($source, $args, $context, $info); |
50 | 50 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
109 | - if (! empty($orderBy)) { |
|
109 | + if (!empty($orderBy)) { |
|
110 | 110 | $criteria->orderBy($orderBy); |
111 | 111 | } |
112 | 112 | |
@@ -223,11 +223,11 @@ discard block |
||
223 | 223 | 'cursor' => $cursors['last'], |
224 | 224 | ]; |
225 | 225 | |
226 | - if (! $startCursor) { |
|
226 | + if (!$startCursor) { |
|
227 | 227 | $startCursor = $cursors['last']; |
228 | 228 | } |
229 | 229 | |
230 | - if (! $cursors['first']) { |
|
230 | + if (!$cursors['first']) { |
|
231 | 231 | $cursors['first'] = $cursors['last']; |
232 | 232 | } |
233 | 233 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $limit = $associationLimit; |
266 | 266 | } |
267 | 267 | |
268 | - if (! $limit) { |
|
268 | + if (!$limit) { |
|
269 | 269 | $limit = $this->config->getLimit(); |
270 | 270 | } |
271 | 271 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $offset = 0; |
287 | 287 | } |
288 | 288 | |
289 | - if ($paginationFields['last'] && ! $paginationFields['before']) { |
|
289 | + if ($paginationFields['last'] && !$paginationFields['before']) { |
|
290 | 290 | $offset = $itemCount - $paginationFields['last']; |
291 | 291 | } |
292 | 292 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public function get(Entity $entity, string|null $eventName): Closure |
36 | 36 | { |
37 | - return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) { |
|
37 | + return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) { |
|
38 | 38 | $entityClass = $entity->getEntityClass(); |
39 | 39 | $queryBuilderFilter = new QueryBuilderFilter(); |
40 | 40 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $itemCount = $paginator->count(); |
149 | 149 | |
150 | 150 | // Rebuild paginator if needed |
151 | - if ($paginationFields['last'] && ! $paginationFields['before']) { |
|
151 | + if ($paginationFields['last'] && !$paginationFields['before']) { |
|
152 | 152 | $offsetAndLimit['offset'] = $itemCount - $paginationFields['last']; |
153 | 153 | $queryBuilder->setFirstResult($offsetAndLimit['offset']); |
154 | 154 | $paginator = new Paginator($queryBuilder->getQuery()); |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | 'cursor' => $cursors['last'], |
164 | 164 | ]; |
165 | 165 | |
166 | - if (! $startCursor) { |
|
166 | + if (!$startCursor) { |
|
167 | 167 | $startCursor = $cursors['last']; |
168 | 168 | } |
169 | 169 | |
170 | - if (! $cursors['first']) { |
|
170 | + if (!$cursors['first']) { |
|
171 | 171 | $cursors['first'] = $cursors['last']; |
172 | 172 | } |
173 | 173 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | $limit = $this->metadata[$entity->getEntityClass()]['limit']; |
198 | 198 | |
199 | - if (! $limit) { |
|
199 | + if (!$limit) { |
|
200 | 200 | $limit = $this->config->getLimit(); |
201 | 201 | } |
202 | 202 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function parseLiteral(ASTNode $valueNode, array|null $variables = null): array|null |
25 | 25 | { |
26 | 26 | // @codeCoverageIgnoreStart |
27 | - if (! $valueNode instanceof StringValueNode) { |
|
27 | + if (!$valueNode instanceof StringValueNode) { |
|
28 | 28 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
29 | 29 | } |
30 | 30 | |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function parseValue(mixed $value): array|null |
41 | 41 | { |
42 | - if (! is_string($value)) { |
|
42 | + if (!is_string($value)) { |
|
43 | 43 | throw new Error('JSON is not a string: ' . $value); |
44 | 44 | } |
45 | 45 | |
46 | 46 | $data = json_decode($value, true); |
47 | 47 | |
48 | - if (! $data) { |
|
48 | + if (!$data) { |
|
49 | 49 | throw new Error('Could not parse JSON data'); |
50 | 50 | } |
51 | 51 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $return = json_encode($value); |
58 | 58 | |
59 | - if (! $return) { |
|
59 | + if (!$return) { |
|
60 | 60 | return null; |
61 | 61 | } |
62 | 62 |