@@ -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 | |
@@ -32,8 +32,8 @@ discard block |
||
| 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 | |
@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | ) |
| 51 | 51 | ->set( |
| 52 | 52 | Metadata\Metadata::class, |
| 53 | - static function (ContainerInterface $container) use ($metadataConfig) { |
|
| 53 | + static function(ContainerInterface $container) use ($metadataConfig) { |
|
| 54 | 54 | return (new Metadata\MetadataFactory($container, $metadataConfig))->getMetadata(); |
| 55 | 55 | }, |
| 56 | 56 | ) |
| 57 | 57 | ->set( |
| 58 | 58 | Resolve\FieldResolver::class, |
| 59 | - static function (ContainerInterface $container) { |
|
| 59 | + static function(ContainerInterface $container) { |
|
| 60 | 60 | return new Resolve\FieldResolver( |
| 61 | 61 | $container->get(Config::class), |
| 62 | 62 | $container->get(Metadata\Metadata::class), |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ) |
| 66 | 66 | ->set( |
| 67 | 67 | Resolve\ResolveCollectionFactory::class, |
| 68 | - static function (ContainerInterface $container) { |
|
| 68 | + static function(ContainerInterface $container) { |
|
| 69 | 69 | return new Resolve\ResolveCollectionFactory( |
| 70 | 70 | $container->get(EntityManager::class), |
| 71 | 71 | $container->get(Config::class), |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | ) |
| 77 | 77 | ->set( |
| 78 | 78 | Resolve\ResolveEntityFactory::class, |
| 79 | - static function (ContainerInterface $container) { |
|
| 79 | + static function(ContainerInterface $container) { |
|
| 80 | 80 | return new Resolve\ResolveEntityFactory( |
| 81 | 81 | $container->get(Config::class), |
| 82 | 82 | $container->get(EntityManager::class), |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | ) |
| 87 | 87 | ->set( |
| 88 | 88 | Criteria\CriteriaFactory::class, |
| 89 | - static function (ContainerInterface $container) { |
|
| 89 | + static function(ContainerInterface $container) { |
|
| 90 | 90 | return new Criteria\CriteriaFactory( |
| 91 | 91 | $container->get(Config::class), |
| 92 | 92 | $container->get(EntityManager::class), |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | ) |
| 98 | 98 | ->set( |
| 99 | 99 | Hydrator\HydratorFactory::class, |
| 100 | - static function (ContainerInterface $container) { |
|
| 100 | + static function(ContainerInterface $container) { |
|
| 101 | 101 | return new Hydrator\HydratorFactory( |
| 102 | 102 | $container->get(EntityManager::class), |
| 103 | 103 | $container->get(Metadata\Metadata::class), |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | ) |
| 107 | 107 | ->set( |
| 108 | 108 | Input\InputFactory::class, |
| 109 | - static function (ContainerInterface $container) { |
|
| 109 | + static function(ContainerInterface $container) { |
|
| 110 | 110 | return new Input\InputFactory( |
| 111 | 111 | $container->get(Config::class), |
| 112 | 112 | $container->get(EntityManager::class), |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | public function get(Entity $entity): Closure |
| 53 | 53 | { |
| 54 | - return function ($source, $args, $context, ResolveInfo $resolveInfo) { |
|
| 54 | + return function($source, $args, $context, ResolveInfo $resolveInfo) { |
|
| 55 | 55 | $fieldResolver = $this->fieldResolver; |
| 56 | 56 | $collection = $fieldResolver($source, $args, $context, $resolveInfo); |
| 57 | 57 | |
@@ -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 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | public function get(Entity $entity, string $eventName): Closure |
| 30 | 30 | { |
| 31 | - return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) { |
|
| 31 | + return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) { |
|
| 32 | 32 | $entityClass = $entity->getEntityClass(); |
| 33 | 33 | // Resolve top level filters |
| 34 | 34 | $filterTypes = $args['filter'] ?? []; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $paginator = new Paginator($queryBuilder->getQuery()); |
| 158 | 158 | $itemCount = $paginator->count(); |
| 159 | 159 | |
| 160 | - if ($last && ! $before) { |
|
| 160 | + if ($last && !$before) { |
|
| 161 | 161 | $offset = $itemCount - $last; |
| 162 | 162 | $queryBuilder->setFirstResult($offset); |
| 163 | 163 | $paginator = new Paginator($queryBuilder->getQuery()); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | ]; |
| 177 | 177 | |
| 178 | 178 | $lastCursor = $cursor; |
| 179 | - if (! $firstCursor) { |
|
| 179 | + if (!$firstCursor) { |
|
| 180 | 180 | $firstCursor = $cursor; |
| 181 | 181 | } |
| 182 | 182 | |
@@ -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 { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function parseLiteral(Node $valueNode, array|null $variables = null): string |
| 22 | 22 | { |
| 23 | 23 | // @codeCoverageIgnoreStart |
| 24 | - if (! $valueNode instanceof StringValueNode) { |
|
| 24 | + if (!$valueNode instanceof StringValueNode) { |
|
| 25 | 25 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function parseValue(mixed $value): PHPDateTime|false |
| 34 | 34 | { |
| 35 | - if (! is_string($value)) { |
|
| 35 | + if (!is_string($value)) { |
|
| 36 | 36 | throw new Error('Date is not a string: ' . $value); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function parseLiteral(Node $valueNode, array|null $variables = null): string |
| 22 | 22 | { |
| 23 | 23 | // @codeCoverageIgnoreStart |
| 24 | - if (! $valueNode instanceof StringValueNode) { |
|
| 24 | + if (!$valueNode instanceof StringValueNode) { |
|
| 25 | 25 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function parseValue(mixed $value): PHPDateTime |
| 34 | 34 | { |
| 35 | - if (! is_string($value)) { |
|
| 35 | + if (!is_string($value)) { |
|
| 36 | 36 | throw new Error('Time is not a string: ' . $value); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function parseLiteral(Node $valueNode, array|null $variables = null): string |
| 22 | 22 | { |
| 23 | 23 | // @codeCoverageIgnoreStart |
| 24 | - if (! $valueNode instanceof StringValueNode) { |
|
| 24 | + if (!$valueNode instanceof StringValueNode) { |
|
| 25 | 25 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function parseValue(mixed $value): PHPDateTime |
| 34 | 34 | { |
| 35 | - if (! is_string($value)) { |
|
| 35 | + if (!is_string($value)) { |
|
| 36 | 36 | throw new Error('Date is not a string: ' . $value); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function parseLiteral(Node $valueNode, array|null $variables = null): string |
| 22 | 22 | { |
| 23 | 23 | // @codeCoverageIgnoreStart |
| 24 | - if (! $valueNode instanceof StringValueNode) { |
|
| 24 | + if (!$valueNode instanceof StringValueNode) { |
|
| 25 | 25 | throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | public function parseValue(mixed $value): PHPDateTime|false |
| 34 | 34 | { |
| 35 | - if (! is_string($value)) { |
|
| 35 | + if (!is_string($value)) { |
|
| 36 | 36 | throw new Error('Time is not a string: ' . $value); |
| 37 | 37 | } |
| 38 | 38 | |