@@ -25,7 +25,7 @@ |
||
25 | 25 | { |
26 | 26 | $id = strtolower($id); |
27 | 27 | |
28 | - if (! $this->has($id)) { |
|
28 | + if (!$this->has($id)) { |
|
29 | 29 | throw new Error($id . ' is not registered'); |
30 | 30 | } |
31 | 31 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * For disabled hydrator cache, store only last hydrator result and reuse for consecutive calls |
39 | 39 | * then drop the cache if it doesn't hit. |
40 | 40 | */ |
41 | - if (! $this->config->getUseHydratorCache()) { |
|
41 | + if (!$this->config->getUseHydratorCache()) { |
|
42 | 42 | if (isset($this->extractValues[$splObjectHash])) { |
43 | 43 | return $this->extractValues[$splObjectHash][$info->fieldName] ?? null; |
44 | 44 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return new InputObjectType([ |
43 | 43 | 'name' => $targetEntity->getTypeName() . '_Input', |
44 | 44 | 'description' => $targetEntity->getDescription(), |
45 | - 'fields' => function () use ($id, $targetEntity, $requiredFields, $optionalFields): array { |
|
45 | + 'fields' => function() use ($id, $targetEntity, $requiredFields, $optionalFields): array { |
|
46 | 46 | $fields = []; |
47 | 47 | |
48 | 48 | foreach ($this->entityManager->getClassMetadata($id)->getFieldNames() as $fieldName) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * no reason to set or update an identifier. For the case where an identifier |
52 | 52 | * should be set or updated, this facotry is not the correct solution. |
53 | 53 | */ |
54 | - if (! empty($optionalFields)) { |
|
54 | + if (!empty($optionalFields)) { |
|
55 | 55 | // Include field as optional |
56 | 56 | if (in_array($fieldName, $optionalFields) || $optionalFields === ['*']) { |
57 | 57 | if ($optionalFields === ['*'] && $this->entityManager->getClassMetadata($id)->isIdentifier($fieldName)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $fields[$fieldName]['description'] = $targetEntity->getMetadataConfig()['fields'][$fieldName]['description']; |
62 | 62 | $fields[$fieldName]['type'] = $this->typeManager->get($targetEntity->getMetadataConfig()['fields'][$fieldName]['type']); |
63 | 63 | } |
64 | - } elseif (! empty($requiredFields)) { |
|
64 | + } elseif (!empty($requiredFields)) { |
|
65 | 65 | // Include fields as required |
66 | 66 | if (in_array($fieldName, $requiredFields) || $requiredFields === ['*']) { |
67 | 67 | if ($requiredFields === ['*'] && $this->entityManager->getClassMetadata($id)->isIdentifier($fieldName)) { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | private bool $byValue; |
17 | 17 | |
18 | 18 | /** @var string|null Documentation for the entity within GraphQL */ |
19 | - private string|null $description = null; |
|
19 | + private string | null $description = null; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @var mixed[] An array of filters as |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | public function __construct( |
35 | 35 | string $group = 'default', |
36 | 36 | bool $byValue = true, |
37 | - string|null $description = null, |
|
38 | - private string|null $typeName = null, |
|
37 | + string | null $description = null, |
|
38 | + private string | null $typeName = null, |
|
39 | 39 | array $filters = [], |
40 | - private string|null $namingStrategy = null, |
|
40 | + private string | null $namingStrategy = null, |
|
41 | 41 | private array $excludeCriteria = [], |
42 | 42 | ) { |
43 | 43 | $this->group = $group; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $this->filters = $filters; |
47 | 47 | } |
48 | 48 | |
49 | - public function getGroup(): string|null |
|
49 | + public function getGroup(): string | null |
|
50 | 50 | { |
51 | 51 | return $this->group; |
52 | 52 | } |
@@ -56,12 +56,12 @@ discard block |
||
56 | 56 | return $this->byValue; |
57 | 57 | } |
58 | 58 | |
59 | - public function getDescription(): string|null |
|
59 | + public function getDescription(): string | null |
|
60 | 60 | { |
61 | 61 | return $this->description; |
62 | 62 | } |
63 | 63 | |
64 | - public function getTypeName(): string|null |
|
64 | + public function getTypeName(): string | null |
|
65 | 65 | { |
66 | 66 | return $this->typeName; |
67 | 67 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | return $this->filters; |
73 | 73 | } |
74 | 74 | |
75 | - public function getNamingStrategy(): string|null |
|
75 | + public function getNamingStrategy(): string | null |
|
76 | 76 | { |
77 | 77 | return $this->namingStrategy; |
78 | 78 | } |
@@ -11,13 +11,13 @@ |
||
11 | 11 | class Password implements |
12 | 12 | FilterInterface |
13 | 13 | { |
14 | - public function filter(string $property, object|null $instance = null): bool |
|
14 | + public function filter(string $property, object | null $instance = null): bool |
|
15 | 15 | { |
16 | 16 | $excludeFields = [ |
17 | 17 | 'password', |
18 | 18 | 'secret', |
19 | 19 | ]; |
20 | 20 | |
21 | - return ! in_array($property, $excludeFields); |
|
21 | + return !in_array($property, $excludeFields); |
|
22 | 22 | } |
23 | 23 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | class AssociationDefault extends AbstractCollectionStrategy implements |
14 | 14 | StrategyInterface |
15 | 15 | { |
16 | - public function extract(mixed $value, object|null $object = null): mixed |
|
16 | + public function extract(mixed $value, object | null $object = null): mixed |
|
17 | 17 | { |
18 | 18 | return $value; |
19 | 19 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @codeCoverageIgnore |
25 | 25 | */ |
26 | - public function hydrate(mixed $value, array|null $data): mixed |
|
26 | + public function hydrate(mixed $value, array | null $data): mixed |
|
27 | 27 | { |
28 | 28 | return $value; |
29 | 29 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | class FieldDefault extends AbstractCollectionStrategy implements |
13 | 13 | StrategyInterface |
14 | 14 | { |
15 | - public function extract(mixed $value, object|null $object = null): mixed |
|
15 | + public function extract(mixed $value, object | null $object = null): mixed |
|
16 | 16 | { |
17 | 17 | return $value; |
18 | 18 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * |
23 | 23 | * @codeCoverageIgnore |
24 | 24 | */ |
25 | - public function hydrate(mixed $value, array|null $data): mixed |
|
25 | + public function hydrate(mixed $value, array | null $data): mixed |
|
26 | 26 | { |
27 | 27 | return $value; |
28 | 28 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | StrategyInterface |
18 | 18 | { |
19 | 19 | /** @param mixed|null $object */ |
20 | - public function extract(mixed $value, object|null $object = null): mixed |
|
20 | + public function extract(mixed $value, object | null $object = null): mixed |
|
21 | 21 | { |
22 | 22 | if ($value === null) { |
23 | 23 | // @codeCoverageIgnoreStart |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @codeCoverageIgnore |
35 | 35 | */ |
36 | - public function hydrate(mixed $value, array|null $data): mixed |
|
36 | + public function hydrate(mixed $value, array | null $data): mixed |
|
37 | 37 | { |
38 | 38 | if ($value === null) { |
39 | 39 | return $value; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | class ToBoolean extends AbstractCollectionStrategy implements |
15 | 15 | StrategyInterface |
16 | 16 | { |
17 | - public function extract(mixed $value, object|null $object = null): bool|null |
|
17 | + public function extract(mixed $value, object | null $object = null): bool | null |
|
18 | 18 | { |
19 | 19 | if ($value === null) { |
20 | 20 | // @codeCoverageIgnoreStart |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @codeCoverageIgnore |
32 | 32 | */ |
33 | - public function hydrate(mixed $value, array|null $data): bool|null |
|
33 | + public function hydrate(mixed $value, array | null $data): bool | null |
|
34 | 34 | { |
35 | 35 | if ($value === null) { |
36 | 36 | return $value; |