Passed
Push — main ( 6f1871...f44a49 )
by Tom
01:03 queued 14s
created
src/Metadata/MetadataFactory.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
             // Only one matching instance per group is allowed
84 84
             assert(
85
-                ! $entityInstance,
85
+                !$entityInstance,
86 86
                 'Duplicate attribute found for entity '
87 87
                 . $reflectionClass->getName() . ', group ' . $instance->getGroup(),
88 88
             );
@@ -99,8 +99,7 @@  discard block
 block discarded – undo
99 99
                 'excludeCriteria' => $instance->getExcludeCriteria(),
100 100
                 'description' => $instance->getDescription(),
101 101
                 'typeName' => $instance->getTypeName()
102
-                    ? $this->appendGroupSuffix($instance->getTypeName()) :
103
-                    $this->getTypeName($reflectionClass->getName()),
102
+                    ? $this->appendGroupSuffix($instance->getTypeName()) : $this->getTypeName($reflectionClass->getName()),
104 103
             ];
105 104
         }
106 105
     }
@@ -123,7 +122,7 @@  discard block
 block discarded – undo
123 122
 
124 123
                 // Only one matching instance per group is allowed
125 124
                 assert(
126
-                    ! $fieldInstance,
125
+                    !$fieldInstance,
127 126
                     'Duplicate attribute found for field '
128 127
                     . $fieldName . ', group ' . $instance->getGroup(),
129 128
                 );
@@ -174,7 +173,7 @@  discard block
 block discarded – undo
174 173
 
175 174
                 // Only one matching instance per group is allowed
176 175
                 assert(
177
-                    ! $associationInstance,
176
+                    !$associationInstance,
178 177
                     'Duplicate attribute found for association '
179 178
                     . $associationName . ', group ' . $instance->getGroup(),
180 179
                 );
Please login to merge, or discard this patch.
src/Services.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function __construct(
25 25
         EntityManager $entityManager,
26
-        Config|null $config = null,
26
+        Config | null $config = null,
27 27
         array $metadata = [],
28 28
     ) {
29 29
         $metadata = new ArrayObject($metadata);
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             ->set(EntityManager::class, $entityManager)
34 34
             ->set(
35 35
                 Config::class,
36
-                static function () use ($config) {
37
-                    if (! $config) {
36
+                static function() use ($config) {
37
+                    if (!$config) {
38 38
                         $config = new Config();
39 39
                     }
40 40
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             )
52 52
             ->set(
53 53
                 'metadata',
54
-                static function (AbstractContainer $container) use ($metadata) {
54
+                static function(AbstractContainer $container) use ($metadata) {
55 55
                     return (new Metadata\MetadataFactory(
56 56
                         $metadata,
57 57
                         $container->get(EntityManager::class),
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             )
64 64
             ->set(
65 65
                 Metadata\GlobalEnable::class,
66
-                static function (AbstractContainer $container) {
66
+                static function(AbstractContainer $container) {
67 67
                     return new Metadata\GlobalEnable(
68 68
                         $container->get(EntityManager::class),
69 69
                         $container->get(Config::class),
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             )
74 74
             ->set(
75 75
                 Resolve\FieldResolver::class,
76
-                static function (AbstractContainer $container) {
76
+                static function(AbstractContainer $container) {
77 77
                     return new Resolve\FieldResolver(
78 78
                         $container->get(Config::class),
79 79
                         $container->get(Type\TypeManager::class),
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             )
83 83
             ->set(
84 84
                 Resolve\ResolveCollectionFactory::class,
85
-                static function (AbstractContainer $container) {
85
+                static function(AbstractContainer $container) {
86 86
                     return new Resolve\ResolveCollectionFactory(
87 87
                         $container->get(EntityManager::class),
88 88
                         $container->get(Config::class),
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             )
96 96
             ->set(
97 97
                 Resolve\ResolveEntityFactory::class,
98
-                static function (AbstractContainer $container) {
98
+                static function(AbstractContainer $container) {
99 99
                     return new Resolve\ResolveEntityFactory(
100 100
                         $container->get(Config::class),
101 101
                         $container->get(EntityManager::class),
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             )
107 107
             ->set(
108 108
                 Criteria\CriteriaFactory::class,
109
-                static function (AbstractContainer $container) {
109
+                static function(AbstractContainer $container) {
110 110
                     return new Criteria\CriteriaFactory(
111 111
                         $container->get(Config::class),
112 112
                         $container->get(EntityManager::class),
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             )
118 118
             ->set(
119 119
                 Hydrator\HydratorFactory::class,
120
-                static function (AbstractContainer $container) {
120
+                static function(AbstractContainer $container) {
121 121
                     return new Hydrator\HydratorFactory(
122 122
                         $container->get(EntityManager::class),
123 123
                         $container->get(Type\TypeManager::class),
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             )
127 127
             ->set(
128 128
                 Input\InputFactory::class,
129
-                static function (AbstractContainer $container) {
129
+                static function(AbstractContainer $container) {
130 130
                     return new Input\InputFactory(
131 131
                         $container->get(Config::class),
132 132
                         $container->get(EntityManager::class),
Please login to merge, or discard this patch.
src/Attribute/Entity.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     private int $limit;
26 26
 
27 27
     /** @var string|null Documentation for the entity within GraphQL */
28
-    private string|null $description = null;
28
+    private string | null $description = null;
29 29
 
30 30
     /**
31 31
      * @var mixed[] An array of filters as
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
         string $group = 'default',
46 46
         bool $byValue = true,
47 47
         int $limit = 0,
48
-        string|null $description = null,
49
-        private string|null $typeName = null,
48
+        string | null $description = null,
49
+        private string | null $typeName = null,
50 50
         array $filters = [],
51
-        private string|null $namingStrategy = null,
51
+        private string | null $namingStrategy = null,
52 52
         private array $excludeCriteria = [],
53 53
         private array $includeCriteria = [],
54 54
     ) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $this->filters     = $filters;
60 60
     }
61 61
 
62
-    public function getGroup(): string|null
62
+    public function getGroup(): string | null
63 63
     {
64 64
         return $this->group;
65 65
     }
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
         return $this->limit;
75 75
     }
76 76
 
77
-    public function getDescription(): string|null
77
+    public function getDescription(): string | null
78 78
     {
79 79
         return $this->description;
80 80
     }
81 81
 
82
-    public function getTypeName(): string|null
82
+    public function getTypeName(): string | null
83 83
     {
84 84
         return $this->typeName;
85 85
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         return $this->filters;
91 91
     }
92 92
 
93
-    public function getNamingStrategy(): string|null
93
+    public function getNamingStrategy(): string | null
94 94
     {
95 95
         return $this->namingStrategy;
96 96
     }
Please login to merge, or discard this patch.
src/Resolve/ResolveCollectionFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             }
119 119
         }
120 120
 
121
-        if (! empty($orderBy)) {
121
+        if (!empty($orderBy)) {
122 122
             $criteria->orderBy($orderBy);
123 123
         }
124 124
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         array $pagination,
136 136
         PersistentCollection $collection,
137 137
         Criteria $criteria,
138
-        string|null $filterCriteriaEventName,
138
+        string | null $filterCriteriaEventName,
139 139
         mixed ...$resolve,
140 140
     ): array {
141 141
         $paginationFields = [
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                 'cursor' => $cursors['last'],
226 226
             ];
227 227
 
228
-            if (! $cursors['first']) {
228
+            if (!$cursors['first']) {
229 229
                 $cursors['first'] = $cursors['last'];
230 230
             }
231 231
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
         $limit = $this->metadata[$targetClassName]['limit'];
254 254
 
255
-        if (! $limit) {
255
+        if (!$limit) {
256 256
             $limit = $this->config->getLimit();
257 257
         }
258 258
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             $offset = 0;
274 274
         }
275 275
 
276
-        if ($paginationFields['last'] && ! $paginationFields['before']) {
276
+        if ($paginationFields['last'] && !$paginationFields['before']) {
277 277
             $offset = $itemCount - $paginationFields['last'];
278 278
         }
279 279
 
Please login to merge, or discard this patch.
src/Resolve/ResolveEntityFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function get(Entity $entity, string $eventName): Closure
35 35
     {
36
-        return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
36
+        return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
37 37
             $entityClass = $entity->getEntityClass();
38 38
 
39 39
             $queryBuilderFilter = (new Applicator($this->entityManager, $entityClass))
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $itemCount = $paginator->count();
191 191
 
192 192
         // Rebuild paginator if needed
193
-        if ($paginationFields['last'] && ! $paginationFields['before']) {
193
+        if ($paginationFields['last'] && !$paginationFields['before']) {
194 194
             $offsetAndLimit['offset'] = $itemCount - $paginationFields['last'];
195 195
             $queryBuilder->setFirstResult($offsetAndLimit['offset']);
196 196
             $paginator = new Paginator($queryBuilder->getQuery());
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 'cursor' => $cursors['last'],
205 205
             ];
206 206
 
207
-            if (! $cursors['first']) {
207
+            if (!$cursors['first']) {
208 208
                 $cursors['first'] = $cursors['last'];
209 209
             }
210 210
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         $limit = $this->metadata[$entity->getEntityClass()]['limit'];
234 234
 
235
-        if (! $limit) {
235
+        if (!$limit) {
236 236
             $limit = $this->config->getLimit();
237 237
         }
238 238
 
Please login to merge, or discard this patch.