Passed
Push — main ( 4eb27b...5a3b3e )
by Tom
03:14 queued 29s
created
src/Type/DateTimeImmutable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 class DateTimeImmutable extends ScalarType
16 16
 {
17 17
     // phpcs:disable SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
18
-    public string|null $description = 'The `datetime_immutable` scalar type represents datetime data.'
18
+    public string | null $description = 'The `datetime_immutable` scalar type represents datetime data.'
19 19
     . 'The format is ISO-8601 e.g. 2004-02-12T15:19:21+00:00';
20 20
 
21
-    public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
21
+    public function parseLiteral(ASTNode $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
 
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
         return $valueNode->value;
31 31
     }
32 32
 
33
-    public function parseValue(mixed $value): PHPDateTime|false
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
 
39 39
         return PHPDateTime::createFromFormat('Y-m-d\TH:i:sP', $value);
40 40
     }
41 41
 
42
-    public function serialize(mixed $value): string|null
42
+    public function serialize(mixed $value): string | null
43 43
     {
44 44
         if ($value instanceof PHPDateTime) {
45 45
             $value = $value->format('c');
Please login to merge, or discard this patch.
src/Type/TimeImmutable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 class TimeImmutable extends ScalarType
16 16
 {
17 17
     // phpcs:disable SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
18
-    public string|null $description = 'The `Time` scalar type represents time data.'
18
+    public string | null $description = 'The `Time` scalar type represents time data.'
19 19
     . 'The format is e.g. 24 hour:minutes:seconds';
20 20
 
21
-    public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
21
+    public function parseLiteral(ASTNode $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
 
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
         return $valueNode->value;
31 31
     }
32 32
 
33
-    public function parseValue(mixed $value): PHPDateTime|false
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('Time is not a string: ' . $value);
37 37
         }
38 38
 
39 39
         return PHPDateTime::createFromFormat('H:i:s.u', $value);
40 40
     }
41 41
 
42
-    public function serialize(mixed $value): string|null
42
+    public function serialize(mixed $value): string | null
43 43
     {
44 44
         if ($value instanceof PHPDateTime) {
45 45
             $value = $value->format('H:i:s.u');
Please login to merge, or discard this patch.
src/Type/Json.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 class Json extends ScalarType
16 16
 {
17 17
     // phpcs:disable SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
18
-    public string|null $description = 'The `JSON` scalar type represents json data.';
18
+    public string | null $description = 'The `JSON` scalar type represents json data.';
19 19
 
20
-    public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
20
+    public function parseLiteral(ASTNode $valueNode, array | null $variables = null): string
21 21
     {
22 22
         throw new Error('JSON fields are not searchable', $valueNode);
23 23
     }
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @throws Error
29 29
      */
30
-    public function parseValue(mixed $value): array|null
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
 
36 36
         return json_decode($value, true);
37 37
     }
38 38
 
39
-    public function serialize(mixed $value): string|null
39
+    public function serialize(mixed $value): string | null
40 40
     {
41 41
         return json_encode($value);
42 42
     }
Please login to merge, or discard this patch.
src/Type/DateTime.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 class DateTime extends ScalarType
16 16
 {
17 17
     // phpcs:disable SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
18
-    public string|null $description = 'The `DateTime` scalar type represents datetime data.'
18
+    public string | null $description = 'The `DateTime` scalar type represents datetime data.'
19 19
     . 'The format is ISO-8601 e.g. 2004-02-12T15:19:21+00:00';
20 20
 
21
-    public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
21
+    public function parseLiteral(ASTNode $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,14 +32,14 @@  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
 
39 39
         return PHPDateTime::createFromFormat('Y-m-d\TH:i:sP', $value);
40 40
     }
41 41
 
42
-    public function serialize(mixed $value): string|null
42
+    public function serialize(mixed $value): string | null
43 43
     {
44 44
         if ($value instanceof PHPDateTime) {
45 45
             $value = $value->format('c');
Please login to merge, or discard this patch.
src/Type/Date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
 class Date extends ScalarType
16 16
 {
17 17
     // phpcs:disable SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint
18
-    public string|null $description = 'The `Date` scalar type represents datetime data.'
18
+    public string | null $description = 'The `Date` scalar type represents datetime data.'
19 19
     . 'The format is e.g. 2004-02-12';
20 20
 
21
-    public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
21
+    public function parseLiteral(ASTNode $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,14 +32,14 @@  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
 
39 39
         return PHPDateTime::createFromFormat('Y-m-d', $value);
40 40
     }
41 41
 
42
-    public function serialize(mixed $value): string|null
42
+    public function serialize(mixed $value): string | null
43 43
     {
44 44
         if ($value instanceof PHPDateTime) {
45 45
             $value = $value->format('Y-m-d');
Please login to merge, or discard this patch.
src/Attribute/Association.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  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 18
     ) {
19 19
     }
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
         return $this->group;
24 24
     }
25 25
 
26
-    public function getStrategy(): string|null
26
+    public function getStrategy(): string | null
27 27
     {
28 28
         return $this->strategy;
29 29
     }
30 30
 
31
-    public function getDescription(): string|null
31
+    public function getDescription(): string | null
32 32
     {
33 33
         return $this->description;
34 34
     }
Please login to merge, or discard this patch.
src/Attribute/Field.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function __construct(
13 13
         protected string $group = 'default',
14
-        protected string|null $strategy = null,
15
-        protected string|null $description = null,
16
-        protected string|null $type = null,
14
+        protected string | null $strategy = null,
15
+        protected string | null $description = null,
16
+        protected string | null $type = null,
17 17
     ) {
18 18
     }
19 19
 
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
         return $this->group;
23 23
     }
24 24
 
25
-    public function getStrategy(): string|null
25
+    public function getStrategy(): string | null
26 26
     {
27 27
         return $this->strategy;
28 28
     }
29 29
 
30
-    public function getDescription(): string|null
30
+    public function getDescription(): string | null
31 31
     {
32 32
         return $this->description;
33 33
     }
34 34
 
35
-    public function getType(): string|null
35
+    public function getType(): string | null
36 36
     {
37 37
         return $this->type;
38 38
     }
Please login to merge, or discard this patch.
src/Type/Entity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         return $this->metadataConfig['typeName'];
65 65
     }
66 66
 
67
-    public function getDescription(): string|null
67
+    public function getDescription(): string | null
68 68
     {
69 69
         return $this->metadataConfig['description'];
70 70
     }
@@ -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/Services.php 1 patch
Spacing   +11 added lines, -11 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
                 Resolve\FieldResolver::class,
57
-                static function (ContainerInterface $container) {
57
+                static function(ContainerInterface $container) {
58 58
                     return new Resolve\FieldResolver(
59 59
                         $container->get(Config::class),
60 60
                         $container->get(Metadata\Metadata::class),
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             )
64 64
             ->set(
65 65
                 Resolve\ResolveCollectionFactory::class,
66
-                static function (ContainerInterface $container) {
66
+                static function(ContainerInterface $container) {
67 67
                     return new Resolve\ResolveCollectionFactory(
68 68
                         $container->get(EntityManager::class),
69 69
                         $container->get(Config::class),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             )
75 75
             ->set(
76 76
                 Resolve\ResolveEntityFactory::class,
77
-                static function (ContainerInterface $container) {
77
+                static function(ContainerInterface $container) {
78 78
                     return new Resolve\ResolveEntityFactory(
79 79
                         $container->get(Config::class),
80 80
                         $container->get(EntityManager::class),
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             )
85 85
             ->set(
86 86
                 Criteria\CriteriaFactory::class,
87
-                static function (ContainerInterface $container) {
87
+                static function(ContainerInterface $container) {
88 88
                     return new Criteria\CriteriaFactory(
89 89
                         $container->get(Config::class),
90 90
                         $container->get(EntityManager::class),
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             )
96 96
             ->set(
97 97
                 Hydrator\HydratorFactory::class,
98
-                static function (ContainerInterface $container) {
98
+                static function(ContainerInterface $container) {
99 99
                     return new Hydrator\HydratorFactory(
100 100
                         $container->get(EntityManager::class),
101 101
                         $container->get(Metadata\Metadata::class),
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             )
105 105
             ->set(
106 106
                 Input\InputFactory::class,
107
-                static function (ContainerInterface $container) {
107
+                static function(ContainerInterface $container) {
108 108
                     return new Input\InputFactory(
109 109
                         $container->get(Config::class),
110 110
                         $container->get(EntityManager::class),
Please login to merge, or discard this patch.