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