Passed
Pull Request — 12.0.x (#131)
by Tom
02:15
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/Type/Time.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
 
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function parseValue(mixed $value): PHPDateTime
38 38
     {
39
-        if (! is_string($value)) {
39
+        if (!is_string($value)) {
40 40
             throw new Error('Time is not a string: ' . $value);
41 41
         }
42 42
 
43
-        if (! preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) {
43
+        if (!preg_match('/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])(\.\d{1,6})?$/', $value)) {
44 44
             throw new Error('Time ' . $value . ' format does not match H:i:s.u e.g. 13:34:40.867530');
45 45
         }
46 46
 
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
@@ -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): PHPDateTime
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('datetime is not a string: ' . $value);
37 37
         }
38 38
 
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
@@ -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): PHPDateTimeTZ
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('datetimetz is not a string: ' . $value);
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Type/DateTimeTZImmutable.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): PHPDateTimeTZImmutable|false
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('datetimetz_immutable is not a string: ' . $value);
37 37
         }
38 38
 
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
@@ -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.