Passed
Branch main (5561e9)
by Tom
11:29
created
src/AbstractContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Input/InputFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Services.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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),
Please login to merge, or discard this patch.
src/Resolve/ResolveCollectionFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
192 192
                 ];
193 193
 
194 194
                 $lastCursor = $cursor;
195
-                if (! $firstCursor) {
195
+                if (!$firstCursor) {
196 196
                     $firstCursor = $cursor;
197 197
                 }
198 198
 
Please login to merge, or discard this patch.
src/Resolve/ResolveEntityFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
             }
128 128
 
129 129
 // $x = new \Exception();
130
- // $x->
130
+    // $x->
131 131
 
132 132
             if ($offset) {
133 133
                 $queryBuilder->setFirstResult($offset);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
176 176
                 ];
177 177
 
178 178
                 $lastCursor = $cursor;
179
-                if (! $firstCursor) {
179
+                if (!$firstCursor) {
180 180
                     $firstCursor = $cursor;
181 181
                 }
182 182
 
Please login to merge, or discard this patch.
src/Resolve/FieldResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
src/Type/DateTimeImmutable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Type/Time.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Type/DateTime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.