@@ -12,10 +12,10 @@ discard block |
||
| 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 | - protected string|null $filterCriteriaEventName = null, |
|
| 18 | + protected string | null $filterCriteriaEventName = null, |
|
| 19 | 19 | ) { |
| 20 | 20 | } |
| 21 | 21 | |
@@ -24,12 +24,12 @@ discard block |
||
| 24 | 24 | return $this->group; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - public function getStrategy(): string|null |
|
| 27 | + public function getStrategy(): string | null |
|
| 28 | 28 | { |
| 29 | 29 | return $this->strategy; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - public function getDescription(): string|null |
|
| 32 | + public function getDescription(): string | null |
|
| 33 | 33 | { |
| 34 | 34 | return $this->description; |
| 35 | 35 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | return $this->excludeCriteria; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - public function getFilterCriteriaEventName(): string|null |
|
| 43 | + public function getFilterCriteriaEventName(): string | null |
|
| 44 | 44 | { |
| 45 | 45 | return $this->filterCriteriaEventName; |
| 46 | 46 | } |
@@ -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 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | ); |
| 70 | 70 | |
| 71 | 71 | $metadataConfig = $this->metadata->getMetadataConfig(); |
| 72 | - $entityClass = ClassUtils::getRealClass($source::class); |
|
| 72 | + $entityClass = ClassUtils::getRealClass($source::class); |
|
| 73 | 73 | |
| 74 | 74 | return $this->buildPagination( |
| 75 | 75 | $args['pagination'] ?? [], |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if (! empty($orderBy)) { |
|
| 121 | + if (!empty($orderBy)) { |
|
| 122 | 122 | $criteria->orderBy($orderBy); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | array $pagination, |
| 135 | 135 | PersistentCollection $collection, |
| 136 | 136 | Criteria $criteria, |
| 137 | - string|null $filterCriteriaEventName, |
|
| 137 | + string | null $filterCriteriaEventName, |
|
| 138 | 138 | ...$resolve, |
| 139 | 139 | ): array { |
| 140 | 140 | $first = 0; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | // Get total count from collection then match |
| 182 | 182 | $itemCount = count($collection->matching($criteria)); |
| 183 | 183 | |
| 184 | - if ($last && ! $before) { |
|
| 184 | + if ($last && !$before) { |
|
| 185 | 185 | $offset = $itemCount - $last; |
| 186 | 186 | } |
| 187 | 187 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | ]; |
| 223 | 223 | |
| 224 | 224 | $lastCursor = $cursor; |
| 225 | - if (! $firstCursor) { |
|
| 225 | + if (!$firstCursor) { |
|
| 226 | 226 | $firstCursor = $cursor; |
| 227 | 227 | } |
| 228 | 228 | |