@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $float = is_numeric($value) || is_bool($value) ? floatval($value) : null; |
39 | 39 | |
40 | - if ($float === null || ! is_finite($float)) { |
|
40 | + if ($float === null || !is_finite($float)) { |
|
41 | 41 | throw new Error( |
42 | 42 | 'Float cannot represent non numeric value: ' . |
43 | 43 | Utils::printSafe($value) |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $float = is_float($value) || is_int($value) ? floatval($value) : null; |
58 | 58 | |
59 | - if ($float === null || ! is_finite($float)) { |
|
59 | + if ($float === null || !is_finite($float)) { |
|
60 | 60 | throw new Error( |
61 | 61 | 'Float cannot represent non numeric value: ' . |
62 | 62 | Utils::printSafe($value) |
@@ -68,7 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | $map = []; |
70 | 70 | foreach ($config as $name => $argConfig) { |
71 | - if (! is_array($argConfig)) { |
|
71 | + if (!is_array($argConfig)) { |
|
72 | 72 | $argConfig = ['type' => $argConfig]; |
73 | 73 | } |
74 | 74 | $map[] = new self($argConfig + ['name' => $name]); |
@@ -225,7 +225,7 @@ |
||
225 | 225 | $fields = []; |
226 | 226 | foreach ($selectionSet->selections as $selectionNode) { |
227 | 227 | if ($selectionNode instanceof FieldNode) { |
228 | - $fields[$selectionNode->name->value] = $descend > 0 && ! empty($selectionNode->selectionSet) |
|
228 | + $fields[$selectionNode->name->value] = $descend > 0 && !empty($selectionNode->selectionSet) |
|
229 | 229 | ? $this->foldSelectionSet($selectionNode->selectionSet, $descend - 1) |
230 | 230 | : true; |
231 | 231 | } elseif ($selectionNode instanceof FragmentSpreadNode) { |
@@ -77,7 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $isInt = is_int($value) || (is_float($value) && floor($value) === $value); |
79 | 79 | |
80 | - if (! $isInt) { |
|
80 | + if (!$isInt) { |
|
81 | 81 | throw new Error( |
82 | 82 | 'Int cannot represent non-integer value: ' . |
83 | 83 | Utils::printSafe($value) |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function __construct(array $config) |
30 | 30 | { |
31 | - if (! isset($config['name'])) { |
|
31 | + if (!isset($config['name'])) { |
|
32 | 32 | $config['name'] = $this->tryInferName(); |
33 | 33 | } |
34 | 34 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $resolveType = $this->config['resolveType'] ?? null; |
128 | 128 | |
129 | 129 | Utils::invariant( |
130 | - ! isset($resolveType) || is_callable($resolveType), |
|
130 | + !isset($resolveType) || is_callable($resolveType), |
|
131 | 131 | sprintf( |
132 | 132 | '%s must provide "resolveType" as a function, but got: %s', |
133 | 133 | $this->name, |
@@ -41,7 +41,7 @@ |
||
41 | 41 | || is_int($value) |
42 | 42 | || (is_object($value) && method_exists($value, '__toString')); |
43 | 43 | |
44 | - if (! $canCast) { |
|
44 | + if (!$canCast) { |
|
45 | 45 | throw new Error('ID cannot represent value: ' . Utils::printSafe($value)); |
46 | 46 | } |
47 | 47 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function __construct(array $config) |
33 | 33 | { |
34 | - if (! isset($config['name'])) { |
|
34 | + if (!isset($config['name'])) { |
|
35 | 35 | $config['name'] = $this->tryInferName(); |
36 | 36 | } |
37 | 37 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ? call_user_func($fields) |
74 | 74 | : $fields; |
75 | 75 | |
76 | - if (! is_array($fields)) { |
|
76 | + if (!is_array($fields)) { |
|
77 | 77 | throw new InvariantViolation( |
78 | 78 | sprintf('%s fields must be an array or a callable which returns such an array.', $this->name) |
79 | 79 | ); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | parent::assertValid(); |
103 | 103 | |
104 | 104 | Utils::invariant( |
105 | - ! empty($this->getFields()), |
|
105 | + !empty($this->getFields()), |
|
106 | 106 | sprintf( |
107 | 107 | '%s fields must be an associative array with field names as keys or a callable which returns such an array.', |
108 | 108 | $this->name |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | || (is_object($value) && method_exists($value, '__toString')) |
39 | 39 | || $value === null; |
40 | 40 | |
41 | - if (! $canCast) { |
|
41 | + if (!$canCast) { |
|
42 | 42 | throw new Error( |
43 | 43 | 'String cannot represent value: ' . Utils::printSafe($value) |
44 | 44 | ); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function parseValue($value) |
58 | 58 | { |
59 | - if (! is_string($value)) { |
|
59 | + if (!is_string($value)) { |
|
60 | 60 | throw new Error( |
61 | 61 | 'String cannot represent a non string value: ' . Utils::printSafe($value) |
62 | 62 | ); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | 'is also used as an input type, ensure "parseValue" and "parseLiteral" ' . |
65 | 65 | 'functions are also provided.' |
66 | 66 | ); |
67 | - if (! isset($this->config['parseValue']) && ! isset($this->config['parseLiteral'])) { |
|
67 | + if (!isset($this->config['parseValue']) && !isset($this->config['parseLiteral'])) { |
|
68 | 68 | return; |
69 | 69 | } |
70 | 70 |