Passed
Pull Request — 12.2.x (#150)
by Tom
02:21
created
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/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/Blob.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
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
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function parseValue(mixed $value): mixed
38 38
     {
39
-        if (! is_string($value)) {
39
+        if (!is_string($value)) {
40 40
             throw new Error('Blob field as base64 is not a string: ' . $value);
41 41
         }
42 42
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function serialize(mixed $value): mixed
53 53
     {
54
-        if (! $value) {
54
+        if (!$value) {
55 55
             return $value;
56 56
         }
57 57
 
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
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeTZImmutable
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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function parseValue(mixed $value): PHPDateTimeTZImmutable
37 37
     {
38
-        if (! is_string($value)) {
38
+        if (!is_string($value)) {
39 39
             throw new Error('datetimetz_immutable is not a string: ' . $value);
40 40
         }
41 41
 
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
@@ -24,7 +24,7 @@  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
 
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function parseValue(mixed $value): DateTimeImmutable|false
37 37
     {
38
-        if (! is_string($value)) {
38
+        if (!is_string($value)) {
39 39
             throw new Error('Date is not a string: ' . $value);
40 40
         }
41 41
 
42
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
42
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
43 43
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
44 44
         }
45 45
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             throw new Error('Expected DateTimeImmutable object.  Got string.');
53 53
         }
54 54
 
55
-        if (! $value instanceof DateTimeImmutable) {
55
+        if (!$value instanceof DateTimeImmutable) {
56 56
             throw new Error('Expected DateTimeImmutable object.  Got ' . $value::class);
57 57
         }
58 58
 
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
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeTZ
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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function parseValue(mixed $value): PHPDateTimeTZ
37 37
     {
38
-        if (! is_string($value)) {
38
+        if (!is_string($value)) {
39 39
             throw new Error('datetimetz is not a string: ' . $value);
40 40
         }
41 41
 
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
@@ -24,7 +24,7 @@  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
 
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function parseValue(mixed $value): DateTime
37 37
     {
38
-        if (! is_string($value)) {
38
+        if (!is_string($value)) {
39 39
             throw new Error('Date is not a string: ' . $value);
40 40
         }
41 41
 
42
-        if (! preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
42
+        if (!preg_match('/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', $value)) {
43 43
             throw new Error('Date format does not match Y-m-d e.g. 2004-02-12.');
44 44
         }
45 45
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             throw new Error('Expected DateTime object.  Got string.');
53 53
         }
54 54
 
55
-        if (! $value instanceof DateTime) {
55
+        if (!$value instanceof DateTime) {
56 56
             throw new Error('Expected DateTime object.  Got ' . $value::class);
57 57
         }
58 58
 
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
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTime
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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function parseValue(mixed $value): PHPDateTime
37 37
     {
38
-        if (! is_string($value)) {
38
+        if (!is_string($value)) {
39 39
             throw new Error('datetime is not a string: ' . $value);
40 40
         }
41 41
 
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
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): PHPDateTimeImmutable
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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function parseValue(mixed $value): PHPDateTimeImmutable
37 37
     {
38
-        if (! is_string($value)) {
38
+        if (!is_string($value)) {
39 39
             throw new Error('datetime_immutable is not a string: ' . $value);
40 40
         }
41 41
 
Please login to merge, or discard this patch.