Passed
Pull Request — main (#48)
by Tom
12:38
created
src/Type/Date.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 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,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): DateTime
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
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
39
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
40 40
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
41 41
         }
42 42
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             throw new Error('Expected DateTime object.  Got string.');
52 52
         }
53 53
 
54
-        if (! $value instanceof DateTime) {
54
+        if (!$value instanceof DateTime) {
55 55
             throw new Error('Expected DateTime object.  Got ' . $value::class);
56 56
         }
57 57
 
Please login to merge, or discard this patch.
src/Type/Json.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 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
 
36 36
         $data = json_decode($value, true);
37 37
 
38
-        if (! $data) {
38
+        if (!$data) {
39 39
             throw new Error('Could not parse JSON data');
40 40
         }
41 41
 
Please login to merge, or discard this patch.
src/Type/Blob.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function parseValue(mixed $value): mixed
27 27
     {
28
-        if (! is_string($value)) {
28
+        if (!is_string($value)) {
29 29
             throw new Error('Blob field as base64 is not a string: ' . $value);
30 30
         }
31 31
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function serialize(mixed $value): mixed
42 42
     {
43
-        if (! $value) {
43
+        if (!$value) {
44 44
             return $value;
45 45
         }
46 46
 
Please login to merge, or discard this patch.
src/Type/DateImmutable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 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,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): DateTimeImmutable|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
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
39
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
40 40
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
41 41
         }
42 42
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             throw new Error('Expected DateTimeImmutable object.  Got string.');
50 50
         }
51 51
 
52
-        if (! $value instanceof DateTimeImmutable) {
52
+        if (!$value instanceof DateTimeImmutable) {
53 53
             throw new Error('Expected DateTimeImmutable object.  Got ' . $value::class);
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/Type/DateTimeImmutable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 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,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): PHPDateTimeImmutable
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('datetime_immutable is not a string: ' . $value);
37 37
         }
38 38
 
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/Attribute/Field.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 describe a field for GraphQL
12 12
  */
13
-#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)]
13
+#[Attribute(Attribute::TARGET_PROPERTY|Attribute::IS_REPEATABLE)]
14 14
 class Field
15 15
 {
16 16
     use ExcludeFilters;
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
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 /**
11 11
  * Attribute to describe an association for GraphQL
12 12
  */
13
-#[Attribute(Attribute::TARGET_PROPERTY | Attribute::IS_REPEATABLE)]
13
+#[Attribute(Attribute::TARGET_PROPERTY|Attribute::IS_REPEATABLE)]
14 14
 class Association
15 15
 {
16 16
     use ExcludeFilters;
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
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             )
47 47
             ->set(
48 48
                 'metadata',
49
-                static function (AbstractContainer $container) use ($metadata) {
49
+                static function(AbstractContainer $container) use ($metadata) {
50 50
                     return (new Metadata\MetadataFactory(
51 51
                         $metadata,
52 52
                         $container->get(EntityManager::class),
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             )
59 59
             ->set(
60 60
                 Metadata\GlobalEnable::class,
61
-                static function (AbstractContainer $container) {
61
+                static function(AbstractContainer $container) {
62 62
                     return new Metadata\GlobalEnable(
63 63
                         $container->get(EntityManager::class),
64 64
                         $container->get(Config::class),
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             )
69 69
             ->set(
70 70
                 Resolve\FieldResolver::class,
71
-                static function (AbstractContainer $container) {
71
+                static function(AbstractContainer $container) {
72 72
                     return new Resolve\FieldResolver(
73 73
                         $container->get(Config::class),
74 74
                         $container->get(Type\TypeManager::class),
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             )
78 78
             ->set(
79 79
                 Resolve\ResolveCollectionFactory::class,
80
-                static function (AbstractContainer $container) {
80
+                static function(AbstractContainer $container) {
81 81
                     return new Resolve\ResolveCollectionFactory(
82 82
                         $container->get(EntityManager::class),
83 83
                         $container->get(Config::class),
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             )
91 91
             ->set(
92 92
                 Resolve\ResolveEntityFactory::class,
93
-                static function (AbstractContainer $container) {
93
+                static function(AbstractContainer $container) {
94 94
                     return new Resolve\ResolveEntityFactory(
95 95
                         $container->get(Config::class),
96 96
                         $container->get(EntityManager::class),
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             )
102 102
             ->set(
103 103
                 Filter\FilterFactory::class,
104
-                static function (AbstractContainer $container) {
104
+                static function(AbstractContainer $container) {
105 105
                     return new Filter\FilterFactory(
106 106
                         $container->get(Config::class),
107 107
                         $container->get(EntityManager::class),
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             )
113 113
             ->set(
114 114
                 Hydrator\HydratorFactory::class,
115
-                static function (AbstractContainer $container) {
115
+                static function(AbstractContainer $container) {
116 116
                     return new Hydrator\HydratorFactory(
117 117
                         $container->get(EntityManager::class),
118 118
                         $container->get(Type\TypeManager::class),
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             )
122 122
             ->set(
123 123
                 Input\InputFactory::class,
124
-                static function (AbstractContainer $container) {
124
+                static function(AbstractContainer $container) {
125 125
                     return new Input\InputFactory(
126 126
                         $container->get(Config::class),
127 127
                         $container->get(EntityManager::class),
Please login to merge, or discard this patch.