Passed
Push — main ( 947fb5...1d2a77 )
by Tom
55s queued 13s
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/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 1 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/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function parseValue(mixed $value): array|null
31 31
     {
32
-        if (! is_string($value)) {
32
+        if (!is_string($value)) {
33 33
             throw new Error('Json is not a string: ' . $value);
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/Type/Entity.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 case ClassMetadataInfo::MANY_TO_ONE:
121 121
                 case ClassMetadataInfo::TO_ONE:
122 122
                     $targetEntity                    = $associationMetadata['targetEntity'];
123
-                    $graphQLFields[$associationName] = function () use ($targetEntity) {
123
+                    $graphQLFields[$associationName] = function() use ($targetEntity) {
124 124
                         $entity = $this->metadata->get($targetEntity);
125 125
 
126 126
                         return [
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 case ClassMetadataInfo::MANY_TO_MANY:
134 134
                 case ClassMetadataInfo::TO_MANY:
135 135
                     $targetEntity                    = $associationMetadata['targetEntity'];
136
-                    $graphQLFields[$associationName] = function () use ($targetEntity, $associationName) {
136
+                    $graphQLFields[$associationName] = function() use ($targetEntity, $associationName) {
137 137
                         $entity    = $this->metadata->get($targetEntity);
138 138
                         $shortName = $this->getTypeName() . '_' . $associationName;
139 139
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $arrayObject = new ArrayObject([
163 163
             'name' => $this->getTypeName(),
164 164
             'description' => $this->getDescription(),
165
-            'fields' => static function () use ($graphQLFields) {
165
+            'fields' => static function() use ($graphQLFields) {
166 166
                 return $graphQLFields;
167 167
             },
168 168
             'resolveField' => $this->fieldResolver,
Please login to merge, or discard this patch.
src/Attribute/Field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/Attribute/Association.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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 */
Please login to merge, or discard this patch.