Passed
Pull Request — 12.3.x (#164)
by Tom
10:46 queued 05:05
created
src/Type/TimeImmutable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
23 23
     {
24 24
         // @codeCoverageIgnoreStart
25
-        if (! $valueNode instanceof StringValueNode) {
25
+        if (!$valueNode instanceof StringValueNode) {
26 26
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
27 27
         }
28 28
 
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function parseValue(mixed $value): PHPDateTime|false
35 35
     {
36
-        if (! is_string($value)) {
36
+        if (!is_string($value)) {
37 37
             throw new Error('Time is not a string: ' . $value);
38 38
         }
39 39
 
40
-        if (! preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) {
40
+        if (!preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) {
41 41
             throw new Error('Time ' . $value . ' format does not match H:i:s.u e.g. 13:34:40.867530');
42 42
         }
43 43
 
Please login to merge, or discard this patch.
src/Attribute/Entity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 /**
11 11
  * Attribute to define an entity for GraphQL
12 12
  */
13
-#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
13
+#[Attribute(Attribute::TARGET_CLASS|Attribute::IS_REPEATABLE)]
14 14
 final class Entity
15 15
 {
16 16
     use ExcludeFilters;
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
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function get(Entity $entity, string|null $eventName): Closure
36 36
     {
37
-        return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
37
+        return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
38 38
             $entityClass        = $entity->getEntityClass();
39 39
             $queryBuilderFilter = new QueryBuilderFilter();
40 40
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $itemCount = $paginator->count();
148 148
 
149 149
         // Rebuild paginator if needed
150
-        if ($paginationFields['last'] && ! $paginationFields['before']) {
150
+        if ($paginationFields['last'] && !$paginationFields['before']) {
151 151
             $offsetAndLimit['offset'] = $itemCount - $paginationFields['last'];
152 152
             $queryBuilder->setFirstResult($offsetAndLimit['offset']);
153 153
             $paginator = new Paginator($queryBuilder->getQuery());
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 'cursor' => $cursors['last'],
162 162
             ];
163 163
 
164
-            if (! $cursors['first']) {
164
+            if (!$cursors['first']) {
165 165
                 $cursors['first'] = $cursors['last'];
166 166
             }
167 167
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
         $limit = $this->metadata[$entity->getEntityClass()]['limit'];
191 191
 
192
-        if (! $limit) {
192
+        if (!$limit) {
193 193
             $limit = $this->config->getLimit();
194 194
         }
195 195
 
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
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
          * For disabled hydrator cache, store only the last hydrator result and reuse for consecutive calls
47 47
          * then drop the cache if it doesn't hit.
48 48
          */
49
-        if (! $this->config->getUseHydratorCache()) {
49
+        if (!$this->config->getUseHydratorCache()) {
50 50
             if (isset($this->extractValues[$splObjectHash])) {
51 51
                 return $this->extractValues[$splObjectHash][$info->fieldName] ?? null;
52 52
             }
Please login to merge, or discard this patch.
src/Metadata/MetadataFactory.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
             // Only one matching instance per group is allowed
97 97
             assert(
98
-                ! $entityInstance,
98
+                !$entityInstance,
99 99
                 'Duplicate attribute found for entity '
100 100
                 . $reflectionClass->getName() . ', group ' . $instance->getGroup(),
101 101
             );
@@ -112,8 +112,7 @@  discard block
 block discarded – undo
112 112
                 'excludeFilters' => Filters::toStringArray($instance->getExcludeFilters()),
113 113
                 'description' => $instance->getDescription(),
114 114
                 'typeName' => $instance->getTypeName()
115
-                    ? $this->appendGroupSuffix($instance->getTypeName()) :
116
-                    $this->getTypeName($reflectionClass->getName()),
115
+                    ? $this->appendGroupSuffix($instance->getTypeName()) : $this->getTypeName($reflectionClass->getName()),
117 116
             ];
118 117
         }
119 118
     }
@@ -139,7 +138,7 @@  discard block
 block discarded – undo
139 138
 
140 139
                 // Only one matching instance per group is allowed
141 140
                 assert(
142
-                    ! $fieldInstance,
141
+                    !$fieldInstance,
143 142
                     'Duplicate attribute found for field '
144 143
                     . $fieldName . ', group ' . $instance->getGroup(),
145 144
                 );
@@ -184,7 +183,7 @@  discard block
 block discarded – undo
184 183
 
185 184
                 // Only one matching instance per group is allowed
186 185
                 assert(
187
-                    ! $associationInstance,
186
+                    !$associationInstance,
188 187
                     'Duplicate attribute found for association '
189 188
                     . $associationName . ', group ' . $instance->getGroup(),
190 189
                 );
Please login to merge, or discard this patch.
src/Filter/Filters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public static function fromArray(array $filters): array
89 89
     {
90 90
         $filters = array_map(
91
-            static function ($filter) {
91
+            static function($filter) {
92 92
                 return is_string($filter) ? Filters::from($filter) : $filter;
93 93
             },
94 94
             $filters,
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public static function toStringArray(array $filters): array
108 108
     {
109 109
         return array_map(
110
-            static function (Filters $filter) {
110
+            static function(Filters $filter) {
111 111
                 return $filter->value;
112 112
             },
113 113
             $filters,
Please login to merge, or discard this patch.
src/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $id = strtolower($id);
30 30
 
31
-        if (! $this->has($id)) {
31
+        if (!$this->has($id)) {
32 32
             throw new Error($id . ' is not registered');
33 33
         }
34 34
 
Please login to merge, or discard this patch.
src/Services.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
             ->set(EntityManager::class, $entityManager)
29 29
             ->set(
30 30
                 Config::class,
31
-                static function () use ($config) {
32
-                    if (! $config) {
31
+                static function() use ($config) {
32
+                    if (!$config) {
33 33
                         $config = new Config();
34 34
                     }
35 35
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             )
51 51
             ->set(
52 52
                 'metadata',
53
-                static function (Container $container) use ($metadata) {
53
+                static function(Container $container) use ($metadata) {
54 54
                     return (new Metadata\MetadataFactory(
55 55
                         $metadata,
56 56
                         $container->get(EntityManager::class),
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             )
63 63
             ->set(
64 64
                 Metadata\GlobalEnable::class,
65
-                static function (Container $container) {
65
+                static function(Container $container) {
66 66
                     return new Metadata\GlobalEnable(
67 67
                         $container->get(EntityManager::class),
68 68
                         $container->get(Config::class),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             )
73 73
             ->set(
74 74
                 Resolve\FieldResolver::class,
75
-                static function (Container $container) {
75
+                static function(Container $container) {
76 76
                     return new Resolve\FieldResolver(
77 77
                         $container->get(Config::class),
78 78
                         $container->get(Type\Entity\EntityTypeContainer::class),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             )
82 82
             ->set(
83 83
                 Resolve\ResolveCollectionFactory::class,
84
-                static function (Container $container) {
84
+                static function(Container $container) {
85 85
                     return new Resolve\ResolveCollectionFactory(
86 86
                         $container->get(EntityManager::class),
87 87
                         $container->get(Config::class),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             )
95 95
             ->set(
96 96
                 Resolve\ResolveEntityFactory::class,
97
-                static function (Container $container) {
97
+                static function(Container $container) {
98 98
                     return new Resolve\ResolveEntityFactory(
99 99
                         $container->get(Config::class),
100 100
                         $container->get(EntityManager::class),
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             )
106 106
             ->set(
107 107
                 Filter\FilterFactory::class,
108
-                static function (Container $container) {
108
+                static function(Container $container) {
109 109
                     return new Filter\FilterFactory(
110 110
                         $container->get(Config::class),
111 111
                         $container->get(EntityManager::class),
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             )
117 117
             ->set(
118 118
                 Hydrator\HydratorContainer::class,
119
-                static function (Container $container) {
119
+                static function(Container $container) {
120 120
                     return new Hydrator\HydratorContainer(
121 121
                         $container->get(EntityManager::class),
122 122
                         $container->get(Type\Entity\EntityTypeContainer::class),
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             )
126 126
             ->set(
127 127
                 Input\InputFactory::class,
128
-                static function (Container $container) {
128
+                static function(Container $container) {
129 129
                     return new Input\InputFactory(
130 130
                         $container->get(Config::class),
131 131
                         $container->get(EntityManager::class),
Please login to merge, or discard this patch.
src/Input/InputFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $fields       = [];
45 45
         $targetEntity = $this->entityTypeContainer->get($id);
46 46
 
47
-        if (! count($requiredFields) && ! count($optionalFields)) {
47
+        if (!count($requiredFields) && !count($optionalFields)) {
48 48
             $this->addAllFieldsAsRequired($targetEntity, $fields);
49 49
         } else {
50 50
             $this->addRequiredFields($targetEntity, $requiredFields, $fields);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         array &$fields,
69 69
     ): void {
70 70
         foreach ($this->entityManager->getClassMetadata($targetEntity->getEntityClass())->getFieldNames() as $fieldName) {
71
-            if (! in_array($fieldName, $optionalFields)) {
71
+            if (!in_array($fieldName, $optionalFields)) {
72 72
                 continue;
73 73
             }
74 74
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         array &$fields,
102 102
     ): void {
103 103
         foreach ($this->entityManager->getClassMetadata($targetEntity->getEntityClass())->getFieldNames() as $fieldName) {
104
-            if (! in_array($fieldName, $requiredFields)) {
104
+            if (!in_array($fieldName, $requiredFields)) {
105 105
                 continue;
106 106
             }
107 107
 
Please login to merge, or discard this patch.