Passed
Pull Request — 12.2.x (#150)
by Tom
12:05 queued 09:50
created
src/Type/DateTime.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTime|null
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
31 31
         // @codeCoverageIgnoreEnd
32 32
 
33
-        if (! $valueNode->value) {
33
+        if (!$valueNode->value) {
34 34
             return null;
35 35
         }
36 36
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function parseValue(mixed $value): PHPDateTime
47 47
     {
48
-        if (! is_string($value)) {
48
+        if (!is_string($value)) {
49 49
             throw new Error('datetime is not a string: ' . $value);
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Type/DateTimeTZ.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeTZ|null
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
31 31
         // @codeCoverageIgnoreEnd
32 32
 
33
-        if (! $valueNode->value) {
33
+        if (!$valueNode->value) {
34 34
             return null;
35 35
         }
36 36
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function parseValue(mixed $value): PHPDateTimeTZ
47 47
     {
48
-        if (! is_string($value)) {
48
+        if (!is_string($value)) {
49 49
             throw new Error('datetimetz is not a string: ' . $value);
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Type/Time.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string|null
26 26
     {
27 27
         // @codeCoverageIgnoreStart
28
-        if (! $valueNode instanceof StringValueNode) {
28
+        if (!$valueNode instanceof StringValueNode) {
29 29
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
30 30
         }
31 31
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function parseValue(mixed $value): PHPDateTime
41 41
     {
42
-        if (! is_string($value)) {
42
+        if (!is_string($value)) {
43 43
             throw new Error('Time is not a string: ' . $value);
44 44
         }
45 45
 
46
-        if (! preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) {
46
+        if (!preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) {
47 47
             throw new Error('Time ' . $value . ' format does not match H:i:s.u e.g. 13:34:40.867530');
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/Type/DateTimeImmutable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeImmutable|null
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
31 31
         // @codeCoverageIgnoreEnd
32 32
 
33
-        if (! $valueNode->value) {
33
+        if (!$valueNode->value) {
34 34
             return null;
35 35
         }
36 36
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function parseValue(mixed $value): PHPDateTimeImmutable
47 47
     {
48
-        if (! is_string($value)) {
48
+        if (!is_string($value)) {
49 49
             throw new Error('datetime_immutable is not a string: ' . $value);
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Type/Json.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function parseValue(mixed $value): array|null
41 41
     {
42
-        if (! is_string($value)) {
42
+        if (!is_string($value)) {
43 43
             throw new Error('JSON is not a string: ' . $value);
44 44
         }
45 45
 
46 46
         $data = json_decode($value, true);
47 47
 
48
-        if (! $data) {
48
+        if (!$data) {
49 49
             throw new Error('Could not parse JSON data');
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Type/DateTimeTZImmutable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeTZImmutable|null
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
31 31
         // @codeCoverageIgnoreEnd
32 32
 
33
-        if (! $valueNode->value) {
33
+        if (!$valueNode->value) {
34 34
             return null;
35 35
         }
36 36
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function parseValue(mixed $value): PHPDateTimeTZImmutable|false
47 47
     {
48
-        if (! is_string($value)) {
48
+        if (!is_string($value)) {
49 49
             throw new Error('datetimetz_immutable is not a string: ' . $value);
50 50
         }
51 51
 
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
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): DateTime|null
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
31 31
         // @codeCoverageIgnoreEnd
32 32
 
33
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $valueNode->value)) {
33
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $valueNode->value)) {
34 34
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
35 35
         }
36 36
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function parseValue(mixed $value): DateTime
41 41
     {
42
-        if (! is_string($value)) {
42
+        if (!is_string($value)) {
43 43
             throw new Error('Date is not a string: ' . $value);
44 44
         }
45 45
 
46
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
46
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
47 47
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
48 48
         }
49 49
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             throw new Error('Expected DateTime object.  Got string.');
57 57
         }
58 58
 
59
-        if (! $value instanceof DateTime) {
59
+        if (!$value instanceof DateTime) {
60 60
             throw new Error('Expected DateTime object.  Got ' . $value::class);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Type/DateImmutable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): DateTimeImmutable|false
25 25
     {
26 26
         // @codeCoverageIgnoreStart
27
-        if (! $valueNode instanceof StringValueNode) {
27
+        if (!$valueNode instanceof StringValueNode) {
28 28
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
29 29
         }
30 30
 
31 31
         // @codeCoverageIgnoreEnd
32 32
 
33
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $valueNode->value)) {
33
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $valueNode->value)) {
34 34
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
35 35
         }
36 36
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function parseValue(mixed $value): DateTimeImmutable|false
41 41
     {
42
-        if (! is_string($value)) {
42
+        if (!is_string($value)) {
43 43
             throw new Error('Date is not a string: ' . $value);
44 44
         }
45 45
 
46
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
46
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
47 47
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
48 48
         }
49 49
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             throw new Error('Expected DateTimeImmutable object.  Got string.');
57 57
         }
58 58
 
59
-        if (! $value instanceof DateTimeImmutable) {
59
+        if (!$value instanceof DateTimeImmutable) {
60 60
             throw new Error('Expected DateTimeImmutable object.  Got ' . $value::class);
61 61
         }
62 62
 
Please login to merge, or discard this patch.