Passed
Push — main ( 3566f6...4aba17 )
by Tom
59s queued 13s
created
src/Attribute/Field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
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,
17
-        protected string|null $type = null,
15
+        protected string | null $strategy = null,
16
+        protected string | null $description = null,
17
+        protected string | null $type = null,
18 18
         private array $excludeCriteria = [],
19 19
     ) {
20 20
     }
@@ -24,17 +24,17 @@  discard block
 block discarded – undo
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
     }
36 36
 
37
-    public function getType(): string|null
37
+    public function getType(): string | null
38 38
     {
39 39
         return $this->type;
40 40
     }
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
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function get(Entity $entity, string $eventName): Closure
33 33
     {
34
-        return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
34
+        return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
35 35
             $entityClass = $entity->getEntityClass();
36 36
 
37 37
             $queryBuilderFilter = (new Applicator($this->entityManager, $entityClass))
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $itemCount = $paginator->count();
177 177
 
178 178
         // Rebuild paginator if needed
179
-        if ($last && ! $before) {
179
+        if ($last && !$before) {
180 180
             $offset = $itemCount - $last;
181 181
             $queryBuilder->setFirstResult($offset);
182 182
             $paginator = new Paginator($queryBuilder->getQuery());
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             ];
194 194
 
195 195
             $lastCursor = $cursor;
196
-            if (! $firstCursor) {
196
+            if (!$firstCursor) {
197 197
                 $firstCursor = $cursor;
198 198
             }
199 199
 
Please login to merge, or discard this patch.
src/Criteria/CriteriaFactory.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
     /** @param mixed[]|null $associationMetadata */
34 34
     public function get(
35 35
         Entity $targetEntity,
36
-        Entity|null $owningEntity = null,
37
-        string|null $associationName = null,
38
-        array|null $associationMetadata = null,
36
+        Entity | null $owningEntity = null,
37
+        string | null $associationName = null,
38
+        array | null $associationMetadata = null,
39 39
     ): InputObjectType {
40 40
         $typeName = $owningEntity ?
41 41
             $owningEntity->getTypeName() . '_' . $associationName . '_filter'
@@ -53,22 +53,22 @@  discard block
 block discarded – undo
53 53
         // Limit entity filters
54 54
         if ($entityMetadata['excludeCriteria']) {
55 55
             $excludeCriteria = $entityMetadata['excludeCriteria'];
56
-            $allowedFilters  = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) {
57
-                return ! in_array($value, $excludeCriteria);
56
+            $allowedFilters  = array_filter($allowedFilters, static function($value) use ($excludeCriteria) {
57
+                return !in_array($value, $excludeCriteria);
58 58
             });
59 59
         }
60 60
 
61 61
         // Limit association filters
62 62
         if ($associationName) {
63 63
             $excludeCriteria = $associationMetadata['excludeCriteria'];
64
-            $allowedFilters  = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) {
65
-                return ! in_array($value, $excludeCriteria);
64
+            $allowedFilters  = array_filter($allowedFilters, static function($value) use ($excludeCriteria) {
65
+                return !in_array($value, $excludeCriteria);
66 66
             });
67 67
         }
68 68
 
69 69
         foreach ($classMetadata->getFieldNames() as $fieldName) {
70 70
             // Only process fields that are in the graphql metadata
71
-            if (! in_array($fieldName, array_keys($entityMetadata['fields']))) {
71
+            if (!in_array($fieldName, array_keys($entityMetadata['fields']))) {
72 72
                 continue;
73 73
             }
74 74
 
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
                 $fieldExcludeCriteria = $entityMetadata['fields'][$fieldName]['excludeCriteria'];
93 93
                 $allowedFilters       = array_filter(
94 94
                     $allowedFilters,
95
-                    static function ($value) use ($fieldExcludeCriteria) {
96
-                        return ! in_array($value, $fieldExcludeCriteria);
95
+                    static function($value) use ($fieldExcludeCriteria) {
96
+                        return !in_array($value, $fieldExcludeCriteria);
97 97
                     },
98 98
                 );
99 99
             }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         // Add eq filter for to-one associations
109 109
         foreach ($classMetadata->getAssociationNames() as $associationName) {
110 110
             // Only process fields which are in the graphql metadata
111
-            if (! in_array($associationName, array_keys($entityMetadata['fields']))) {
111
+            if (!in_array($associationName, array_keys($entityMetadata['fields']))) {
112 112
                 continue;
113 113
             }
114 114
 
Please login to merge, or discard this patch.
src/Criteria/Type/BetweenInputObjectType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 class BetweenInputObjectType extends InputObjectType
14 14
 {
15
-    public function __construct(string $typeName, string $fieldName, ScalarType|ListOfType $type)
15
+    public function __construct(string $typeName, string $fieldName, ScalarType | ListOfType $type)
16 16
     {
17 17
         $fields = [
18 18
             'from' => new InputObjectField([
Please login to merge, or discard this patch.
src/Criteria/Type/FiltersInputObjectType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 class FiltersInputObjectType extends InputObjectType
14 14
 {
15 15
     /** @param string[] $allowedFilters */
16
-    public function __construct(string $typeName, string $fieldName, ScalarType|ListOfType $type, array $allowedFilters)
16
+    public function __construct(string $typeName, string $fieldName, ScalarType | ListOfType $type, array $allowedFilters)
17 17
     {
18 18
         $fields       = [];
19 19
         $descriptions = FiltersDef::getDescriptions();
Please login to merge, or discard this patch.
src/Attribute/Association.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Metadata/AbstractMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 {
21 21
     protected Config $config;
22 22
 
23
-    protected function getDefaultStrategy(string|null $fieldType): string
23
+    protected function getDefaultStrategy(string | null $fieldType): string
24 24
     {
25 25
         // Set default strategy based on field type
26 26
         switch ($fieldType) {
Please login to merge, or discard this patch.
src/Metadata/MetadataFactory.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
 
18 18
 class MetadataFactory extends AbstractMetadataFactory
19 19
 {
20
-    protected Metadata|null $metadata = null;
20
+    protected Metadata | null $metadata = null;
21 21
     protected EntityManager $entityManager;
22 22
     protected Config $config;
23 23
 
24 24
     /** @param mixed|null $metadataConfig */
25
-    public function __construct(protected ContainerInterface $container, protected array|null $metadataConfig)
25
+    public function __construct(protected ContainerInterface $container, protected array | null $metadataConfig)
26 26
     {
27 27
         $this->entityManager = $container->get(EntityManager::class);
28 28
         $this->config        = $container->get(Config::class);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
             // Only one matching instance per group is allowed
93 93
             assert(
94
-                ! $entityInstance,
94
+                !$entityInstance,
95 95
                 'Duplicate attribute found for entity '
96 96
                 . $reflectionClass->getName() . ', group ' . $instance->getGroup(),
97 97
             );
@@ -107,8 +107,7 @@  discard block
 block discarded – undo
107 107
                 'excludeCriteria' => $instance->getExcludeCriteria(),
108 108
                 'description' => $instance->getDescription(),
109 109
                 'typeName' => $instance->getTypeName()
110
-                    ? $this->appendGroupSuffix($instance->getTypeName()) :
111
-                    $this->getTypeName($reflectionClass->getName()),
110
+                    ? $this->appendGroupSuffix($instance->getTypeName()) : $this->getTypeName($reflectionClass->getName()),
112 111
             ];
113 112
         }
114 113
     }
@@ -131,7 +130,7 @@  discard block
 block discarded – undo
131 130
 
132 131
                 // Only one matching instance per group is allowed
133 132
                 assert(
134
-                    ! $fieldInstance,
133
+                    !$fieldInstance,
135 134
                     'Duplicate attribute found for field '
136 135
                     . $fieldName . ', group ' . $instance->getGroup(),
137 136
                 );
@@ -182,7 +181,7 @@  discard block
 block discarded – undo
182 181
 
183 182
                 // Only one matching instance per group is allowed
184 183
                 assert(
185
-                    ! $associationInstance,
184
+                    !$associationInstance,
186 185
                     'Duplicate attribute found for association '
187 186
                     . $associationName . ', group ' . $instance->getGroup(),
188 187
                 );
Please login to merge, or discard this patch.
src/Services.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __construct(
24 24
         EntityManager $entityManager,
25
-        Config|null $config = null,
26
-        array|null $metadataConfig = null,
25
+        Config | null $config = null,
26
+        array | null $metadataConfig = null,
27 27
     ) {
28 28
         $this
29 29
             // Plain classes
30 30
             ->set(EntityManager::class, $entityManager)
31 31
             ->set(
32 32
                 Config::class,
33
-                static function () use ($config) {
34
-                    if (! $config) {
33
+                static function() use ($config) {
34
+                    if (!$config) {
35 35
                         $config = new Config();
36 36
                     }
37 37
 
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
             )
49 49
             ->set(
50 50
                 Metadata\Metadata::class,
51
-                static function (ContainerInterface $container) use ($metadataConfig) {
51
+                static function(ContainerInterface $container) use ($metadataConfig) {
52 52
                     return (new Metadata\MetadataFactory($container, $metadataConfig))->getMetadata();
53 53
                 },
54 54
             )
55 55
             ->set(
56 56
                 Metadata\GlobalEnable::class,
57
-                static function (ContainerInterface $container) {
57
+                static function(ContainerInterface $container) {
58 58
                     return new Metadata\GlobalEnable(
59 59
                         $container->get(EntityManager::class),
60 60
                         $container->get(Config::class),
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             )
64 64
             ->set(
65 65
                 Resolve\FieldResolver::class,
66
-                static function (ContainerInterface $container) {
66
+                static function(ContainerInterface $container) {
67 67
                     return new Resolve\FieldResolver(
68 68
                         $container->get(Config::class),
69 69
                         $container->get(Metadata\Metadata::class),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             )
73 73
             ->set(
74 74
                 Resolve\ResolveCollectionFactory::class,
75
-                static function (ContainerInterface $container) {
75
+                static function(ContainerInterface $container) {
76 76
                     return new Resolve\ResolveCollectionFactory(
77 77
                         $container->get(EntityManager::class),
78 78
                         $container->get(Config::class),
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             )
86 86
             ->set(
87 87
                 Resolve\ResolveEntityFactory::class,
88
-                static function (ContainerInterface $container) {
88
+                static function(ContainerInterface $container) {
89 89
                     return new Resolve\ResolveEntityFactory(
90 90
                         $container->get(Config::class),
91 91
                         $container->get(EntityManager::class),
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             )
96 96
             ->set(
97 97
                 Criteria\CriteriaFactory::class,
98
-                static function (ContainerInterface $container) {
98
+                static function(ContainerInterface $container) {
99 99
                     return new Criteria\CriteriaFactory(
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
                 Hydrator\HydratorFactory::class,
109
-                static function (ContainerInterface $container) {
109
+                static function(ContainerInterface $container) {
110 110
                     return new Hydrator\HydratorFactory(
111 111
                         $container->get(EntityManager::class),
112 112
                         $container->get(Metadata\Metadata::class),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             )
116 116
             ->set(
117 117
                 Input\InputFactory::class,
118
-                static function (ContainerInterface $container) {
118
+                static function(ContainerInterface $container) {
119 119
                     return new Input\InputFactory(
120 120
                         $container->get(Config::class),
121 121
                         $container->get(EntityManager::class),
Please login to merge, or discard this patch.