@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | |
7 | 7 | use Attribute; |
8 | 8 | |
9 | -#[Attribute(Attribute::TARGET_PROPERTY|Attribute::IS_REPEATABLE)] |
|
9 | +#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)] |
|
10 | 10 | class Association |
11 | 11 | { |
12 | 12 | /** @param string[] $excludeCriteria */ |
13 | 13 | public function __construct( |
14 | 14 | protected string $group = 'default', |
15 | - protected string|null $strategy = null, |
|
16 | - protected string|null $description = null, |
|
15 | + protected string | null $strategy = null, |
|
16 | + protected string | null $description = null, |
|
17 | 17 | protected array $excludeCriteria = [], |
18 | 18 | ) { |
19 | 19 | } |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | return $this->group; |
24 | 24 | } |
25 | 25 | |
26 | - public function getStrategy(): string|null |
|
26 | + public function getStrategy(): string | null |
|
27 | 27 | { |
28 | 28 | return $this->strategy; |
29 | 29 | } |
30 | 30 | |
31 | - public function getDescription(): string|null |
|
31 | + public function getDescription(): string | null |
|
32 | 32 | { |
33 | 33 | return $this->description; |
34 | 34 | } |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | |
7 | 7 | use Attribute; |
8 | 8 | |
9 | -#[Attribute(Attribute::TARGET_PROPERTY|Attribute::IS_REPEATABLE)] |
|
9 | +#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)] |
|
10 | 10 | class Field |
11 | 11 | { |
12 | 12 | public function __construct( |
13 | 13 | protected string $group = 'default', |
14 | - protected string|null $strategy = null, |
|
15 | - protected string|null $description = null, |
|
16 | - protected string|null $type = null, |
|
14 | + protected string | null $strategy = null, |
|
15 | + protected string | null $description = null, |
|
16 | + protected string | null $type = null, |
|
17 | 17 | ) { |
18 | 18 | } |
19 | 19 | |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | return $this->group; |
23 | 23 | } |
24 | 24 | |
25 | - public function getStrategy(): string|null |
|
25 | + public function getStrategy(): string | null |
|
26 | 26 | { |
27 | 27 | return $this->strategy; |
28 | 28 | } |
29 | 29 | |
30 | - public function getDescription(): string|null |
|
30 | + public function getDescription(): string | null |
|
31 | 31 | { |
32 | 32 | return $this->description; |
33 | 33 | } |
34 | 34 | |
35 | - public function getType(): string|null |
|
35 | + public function getType(): string | null |
|
36 | 36 | { |
37 | 37 | return $this->type; |
38 | 38 | } |
@@ -24,16 +24,16 @@ |
||
24 | 24 | public function __construct( |
25 | 25 | Driver $driver, |
26 | 26 | EntityManager $entityManager, |
27 | - Config|null $config = null, |
|
28 | - array|null $metadataConfig = null, |
|
27 | + Config | null $config = null, |
|
28 | + array | null $metadataConfig = null, |
|
29 | 29 | ) { |
30 | 30 | $driver |
31 | 31 | // Plain classes |
32 | 32 | ->set(EntityManager::class, $entityManager) |
33 | 33 | ->set( |
34 | 34 | Config::class, |
35 | - static function () use ($config) { |
|
36 | - if (! $config) { |
|
35 | + static function() use ($config) { |
|
36 | + if (!$config) { |
|
37 | 37 | $config = new Config(); |
38 | 38 | } |
39 | 39 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return $this->metadataConfig['typeName']; |
65 | 65 | } |
66 | 66 | |
67 | - public function getDescription(): string|null |
|
67 | + public function getDescription(): string | null |
|
68 | 68 | { |
69 | 69 | return $this->metadataConfig['description']; |
70 | 70 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $graphQLFields = []; |
96 | 96 | |
97 | 97 | foreach ($classMetadata->getFieldNames() as $fieldName) { |
98 | - if (! in_array($fieldName, array_keys($this->metadataConfig['fields']))) { |
|
98 | + if (!in_array($fieldName, array_keys($this->metadataConfig['fields']))) { |
|
99 | 99 | continue; |
100 | 100 | } |
101 | 101 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
112 | - if (! in_array($associationName, array_keys($this->metadataConfig['fields']))) { |
|
112 | + if (!in_array($associationName, array_keys($this->metadataConfig['fields']))) { |
|
113 | 113 | continue; |
114 | 114 | } |
115 | 115 |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | // Get total count from collection then match |
165 | 165 | $itemCount = count($collection->matching($criteria)); |
166 | 166 | |
167 | - if ($last && ! $before) { |
|
167 | + if ($last && !$before) { |
|
168 | 168 | $offset = $itemCount - $last; |
169 | 169 | } |
170 | 170 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | ]; |
193 | 193 | |
194 | 194 | $lastCursor = $cursor; |
195 | - if (! $firstCursor) { |
|
195 | + if (!$firstCursor) { |
|
196 | 196 | $firstCursor = $cursor; |
197 | 197 | } |
198 | 198 |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $paginator = new Paginator($queryBuilder->getQuery()); |
155 | 155 | $itemCount = $paginator->count(); |
156 | 156 | |
157 | - if ($last && ! $before) { |
|
157 | + if ($last && !$before) { |
|
158 | 158 | $offset = $itemCount - $last; |
159 | 159 | $queryBuilder->setFirstResult($offset); |
160 | 160 | $paginator = new Paginator($queryBuilder->getQuery()); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | ]; |
174 | 174 | |
175 | 175 | $lastCursor = $cursor; |
176 | - if (! $firstCursor) { |
|
176 | + if (!$firstCursor) { |
|
177 | 177 | $firstCursor = $cursor; |
178 | 178 | } |
179 | 179 |