@@ -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; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | class NullifyOwningAssociation extends AbstractCollectionStrategy implements |
| 34 | 34 | StrategyInterface |
| 35 | 35 | { |
| 36 | - public function extract(mixed $value, object|null $object = null): mixed |
|
| 36 | + public function extract(mixed $value, object | null $object = null): mixed |
|
| 37 | 37 | { |
| 38 | 38 | throw new Error('Query is barred by Nullify Owning Association'); |
| 39 | 39 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @codeCoverageIgnore |
| 47 | 47 | */ |
| 48 | - public function hydrate(mixed $value, array|null $data) |
|
| 48 | + public function hydrate(mixed $value, array | null $data) |
|
| 49 | 49 | { |
| 50 | 50 | return null; |
| 51 | 51 | } |
@@ -26,15 +26,15 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | abstract class AbstractCollectionStrategy implements CollectionStrategyInterface |
| 28 | 28 | { |
| 29 | - private string|null $collectionName = null; |
|
| 29 | + private string | null $collectionName = null; |
|
| 30 | 30 | |
| 31 | - private ClassMetadata|null $metadata = null; |
|
| 31 | + private ClassMetadata | null $metadata = null; |
|
| 32 | 32 | |
| 33 | - private object|null $object = null; |
|
| 33 | + private object | null $object = null; |
|
| 34 | 34 | |
| 35 | 35 | private Inflector $inflector; |
| 36 | 36 | |
| 37 | - public function __construct(Inflector|null $inflector = null) |
|
| 37 | + public function __construct(Inflector | null $inflector = null) |
|
| 38 | 38 | { |
| 39 | 39 | $this->inflector = $inflector ?? InflectorFactory::create()->build(); |
| 40 | 40 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return mixed Returns the value that should be extracted. |
| 91 | 91 | */ |
| 92 | - public function extract(mixed $value, object|null $object = null): mixed |
|
| 92 | + public function extract(mixed $value, object | null $object = null): mixed |
|
| 93 | 93 | { |
| 94 | 94 | return $value; |
| 95 | 95 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 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', |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | class ToInteger extends AbstractCollectionStrategy implements |
| 17 | 17 | StrategyInterface |
| 18 | 18 | { |
| 19 | - public function extract(mixed $value, object|null $object = null): mixed |
|
| 19 | + public function extract(mixed $value, object | null $object = null): mixed |
|
| 20 | 20 | { |
| 21 | 21 | if ($value === null) { |
| 22 | 22 | // @codeCoverageIgnoreStart |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @codeCoverageIgnore |
| 34 | 34 | */ |
| 35 | - public function hydrate(mixed $value, array|null $data): mixed |
|
| 35 | + public function hydrate(mixed $value, array | null $data): mixed |
|
| 36 | 36 | { |
| 37 | 37 | if ($value === null) { |
| 38 | 38 | return $value; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * Be warned, using the same groupSuffix with two different |
| 25 | 25 | * groups can cause collisions. |
| 26 | 26 | */ |
| 27 | - protected string|null $groupSuffix = null; |
|
| 27 | + protected string | null $groupSuffix = null; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @var bool When set to true hydrator results will be cached for the |
@@ -52,14 +52,14 @@ discard block |
||
| 52 | 52 | * all hydrators will extract by reference. This overrides |
| 53 | 53 | * per-entity attribute configuration. |
| 54 | 54 | */ |
| 55 | - protected bool|null $globalByValue = null; |
|
| 55 | + protected bool | null $globalByValue = null; |
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * @var string|null When set, the entityPrefix will be removed from each |
| 59 | 59 | * type name. This simplifies type names and makes reading |
| 60 | 60 | * the GraphQL documentation easier. |
| 61 | 61 | */ |
| 62 | - protected string|null $entityPrefix = null; |
|
| 62 | + protected string | null $entityPrefix = null; |
|
| 63 | 63 | |
| 64 | 64 | /** @param mixed[] $config */ |
| 65 | 65 | public function __construct(array $config = []) |
@@ -86,14 +86,14 @@ discard block |
||
| 86 | 86 | return $this->group; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - protected function setGroupSuffix(string|null $groupSuffix): self |
|
| 89 | + protected function setGroupSuffix(string | null $groupSuffix): self |
|
| 90 | 90 | { |
| 91 | 91 | $this->groupSuffix = $groupSuffix; |
| 92 | 92 | |
| 93 | 93 | return $this; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - public function getGroupSuffix(): string|null |
|
| 96 | + public function getGroupSuffix(): string | null |
|
| 97 | 97 | { |
| 98 | 98 | return $this->groupSuffix; |
| 99 | 99 | } |
@@ -148,26 +148,26 @@ discard block |
||
| 148 | 148 | return $this->globalIgnore; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - protected function setGlobalByValue(bool|null $globalByValue): self |
|
| 151 | + protected function setGlobalByValue(bool | null $globalByValue): self |
|
| 152 | 152 | { |
| 153 | 153 | $this->globalByValue = $globalByValue; |
| 154 | 154 | |
| 155 | 155 | return $this; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - public function getGlobalByValue(): bool|null |
|
| 158 | + public function getGlobalByValue(): bool | null |
|
| 159 | 159 | { |
| 160 | 160 | return $this->globalByValue; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - protected function setEntityPrefix(string|null $entityPrefix): self |
|
| 163 | + protected function setEntityPrefix(string | null $entityPrefix): self |
|
| 164 | 164 | { |
| 165 | 165 | $this->entityPrefix = $entityPrefix; |
| 166 | 166 | |
| 167 | 167 | return $this; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - public function getEntityPrefix(): string|null |
|
| 170 | + public function getEntityPrefix(): string | null |
|
| 171 | 171 | { |
| 172 | 172 | return $this->entityPrefix; |
| 173 | 173 | } |