@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | $this->expectKeyword($lexer, KeywordEnum::FRAGMENT); |
| 300 | 300 | |
| 301 | - $buildTypeCondition = function (LexerInterface $lexer) { |
|
| 301 | + $buildTypeCondition = function(LexerInterface $lexer) { |
|
| 302 | 302 | $this->expectKeyword($lexer, 'on'); |
| 303 | 303 | |
| 304 | 304 | return $this->buildNamedType($lexer); |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | */ |
| 671 | 671 | protected function buildInputFieldsDefinition(LexerInterface $lexer): ?array |
| 672 | 672 | { |
| 673 | - $buildFunction = function (LexerInterface $lexer): array { |
|
| 673 | + $buildFunction = function(LexerInterface $lexer): array { |
|
| 674 | 674 | return $this->buildInputValueDefinition($lexer); |
| 675 | 675 | }; |
| 676 | 676 | |
@@ -911,7 +911,7 @@ discard block |
||
| 911 | 911 | ): array { |
| 912 | 912 | $start = $lexer->getToken(); |
| 913 | 913 | |
| 914 | - $buildValue = function (LexerInterface $lexer, bool $isConst) { |
|
| 914 | + $buildValue = function(LexerInterface $lexer, bool $isConst) { |
|
| 915 | 915 | $this->expect($lexer, TokenKindEnum::COLON); |
| 916 | 916 | |
| 917 | 917 | return $this->buildValueLiteral($lexer, $isConst); |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | */ |
| 986 | 986 | protected function buildArgumentsDefinition(LexerInterface $lexer): ?array |
| 987 | 987 | { |
| 988 | - $buildFunction = function (LexerInterface $lexer): array { |
|
| 988 | + $buildFunction = function(LexerInterface $lexer): array { |
|
| 989 | 989 | return $this->buildInputValueDefinition($lexer); |
| 990 | 990 | }; |
| 991 | 991 | |
@@ -1271,7 +1271,7 @@ discard block |
||
| 1271 | 1271 | * @return mixed |
| 1272 | 1272 | * @throws SyntaxErrorException |
| 1273 | 1273 | */ |
| 1274 | - $buildValue = function (LexerInterface $lexer) { |
|
| 1274 | + $buildValue = function(LexerInterface $lexer) { |
|
| 1275 | 1275 | $this->expect($lexer, TokenKindEnum::COLON); |
| 1276 | 1276 | |
| 1277 | 1277 | return $this->buildValueLiteral($lexer); |
@@ -1301,7 +1301,7 @@ discard block |
||
| 1301 | 1301 | * @return mixed |
| 1302 | 1302 | * @throws SyntaxErrorException |
| 1303 | 1303 | */ |
| 1304 | - $buildValue = function (LexerInterface $lexer) { |
|
| 1304 | + $buildValue = function(LexerInterface $lexer) { |
|
| 1305 | 1305 | $this->expect($lexer, TokenKindEnum::COLON); |
| 1306 | 1306 | |
| 1307 | 1307 | return $this->buildValueLiteral($lexer); |
@@ -1504,7 +1504,7 @@ discard block |
||
| 1504 | 1504 | * @return mixed |
| 1505 | 1505 | * @throws SyntaxErrorException |
| 1506 | 1506 | */ |
| 1507 | - $buildType = function (LexerInterface $lexer) { |
|
| 1507 | + $buildType = function(LexerInterface $lexer) { |
|
| 1508 | 1508 | $this->expect($lexer, TokenKindEnum::COLON); |
| 1509 | 1509 | |
| 1510 | 1510 | return $this->buildTypeReference($lexer); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | if ($this->isEscapedTripleQuote($body, $code, $pos)) { |
| 68 | - $rawValue .= sliceString($body, $chunkStart, $pos).'"""'; |
|
| 68 | + $rawValue .= sliceString($body, $chunkStart, $pos) . '"""'; |
|
| 69 | 69 | $pos += 4; |
| 70 | 70 | $chunkStart = $pos; |
| 71 | 71 | } else { |
@@ -29,6 +29,6 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function __toString(): string |
| 31 | 31 | { |
| 32 | - return (string)$this->getType().'!'; |
|
| 32 | + return (string)$this->getType() . '!'; |
|
| 33 | 33 | } |
| 34 | 34 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function getValuesAsArray(): array |
| 36 | 36 | { |
| 37 | - return array_map(function (SerializationInterface $node) { |
|
| 37 | + return array_map(function(SerializationInterface $node) { |
|
| 38 | 38 | return $node->toArray(); |
| 39 | 39 | }, $this->values); |
| 40 | 40 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function __toString(): string |
| 46 | 46 | { |
| 47 | - return json_encode(array_map(function (ValueNodeInterface $node) { |
|
| 47 | + return json_encode(array_map(function(ValueNodeInterface $node) { |
|
| 48 | 48 | return $node->getValue(); |
| 49 | 49 | }, $this->getValues())); |
| 50 | 50 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | // Trust JSON for ASCII. |
| 51 | 51 | ? json_encode(chrUTF8($code)) |
| 52 | 52 | // Otherwise print the escaped form. |
| 53 | - : '"\\u'.dechex($code).'"'; |
|
| 53 | + : '"\\u' . dechex($code) . '"'; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | function locationsShorthandToArray(array $locations): array |
| 168 | 168 | { |
| 169 | - return array_map(function ($shorthand) { |
|
| 169 | + return array_map(function($shorthand) { |
|
| 170 | 170 | return locationShorthandToArray($shorthand); |
| 171 | 171 | }, $locations); |
| 172 | 172 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | function block(array $array): string |
| 180 | 180 | { |
| 181 | - return !empty($array) ? "{\n".indent(implode("\n", $array))."\n}" : ''; |
|
| 181 | + return !empty($array) ? "{\n" . indent(implode("\n", $array)) . "\n}" : ''; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | /** |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | ?string $maybeString = null, |
| 194 | 194 | ?string $end = null |
| 195 | 195 | ): string { |
| 196 | - return null !== $maybeString ? ($start.$maybeString.($end ?? '')) : ''; |
|
| 196 | + return null !== $maybeString ? ($start . $maybeString . ($end ?? '')) : ''; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | /** |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | function indent(?string $maybeString): string |
| 205 | 205 | { |
| 206 | - return null !== $maybeString ? ' '.preg_replace("/\n/", "\n ", |
|
| 206 | + return null !== $maybeString ? ' ' . preg_replace("/\n/", "\n ", |
|
| 207 | 207 | $maybeString) : ''; |
| 208 | 208 | } |
| 209 | 209 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $type = $this->printNode($node->getType()); |
| 21 | 21 | $defaultValue = $this->printNode($node->getDefaultValue()); |
| 22 | 22 | |
| 23 | - return $variable.': '.$type.wrap(' = ', $defaultValue); |
|
| 23 | + return $variable . ': ' . $type . wrap(' = ', $defaultValue); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $name = $this->printNode($node->getName()); |
| 20 | 20 | $arguments = $this->printNodes($node->getArguments()); |
| 21 | 21 | |
| 22 | - return '@'.$name.wrap('(', implode(', ', $arguments), ')'); |
|
| 22 | + return '@' . $name . wrap('(', implode(', ', $arguments), ')'); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ? $selectionSet |
| 29 | 29 | : implode(' ', [ |
| 30 | 30 | $operation, |
| 31 | - $name.wrap('(', implode(', ', $variablesDefinitions), ')'), |
|
| 31 | + $name . wrap('(', implode(', ', $variablesDefinitions), ')'), |
|
| 32 | 32 | implode(' ', $directives), |
| 33 | 33 | $selectionSet, |
| 34 | 34 | ]); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function write(NodeInterface $node): string |
| 17 | 17 | { |
| 18 | - return $this->printNode($node->getType()).'!'; |
|
| 18 | + return $this->printNode($node->getType()) . '!'; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |