@@ -27,6 +27,6 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function __construct(array $items) |
| 29 | 29 | { |
| 30 | - parent::__construct(fn ($item) => $item instanceof ObjectFieldNode, $items); |
|
| 30 | + parent::__construct(fn($item) => $item instanceof ObjectFieldNode, $items); |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function __construct(TypeNode $type) |
| 37 | 37 | { |
| 38 | - \assert(! $type instanceof self); |
|
| 38 | + \assert(!$type instanceof self); |
|
| 39 | 39 | |
| 40 | 40 | $this->type = $type; |
| 41 | 41 | } |
@@ -43,13 +43,13 @@ |
||
| 43 | 43 | * @var string[] |
| 44 | 44 | */ |
| 45 | 45 | protected const SPECIAL_CHARS = [ |
| 46 | - self::T_BACKSPACE => "\u{0008}", /* '\b' */ |
|
| 47 | - self::T_FORM_FEED => "\u{000C}", /* '\f' */ |
|
| 48 | - self::T_NEW_LINE => "\u{000A}", /* '\n' */ |
|
| 49 | - self::T_CARRIAGE_RETURN => "\u{000D}", /* '\r' */ |
|
| 50 | - self::T_HORIZONTAL_TAB => "\u{0009}", /* '\t' */ |
|
| 51 | - self::T_ESCAPED_QUOTE => '"', /* '\"' */ |
|
| 52 | - self::T_ESCAPED_BACK_SLASH => '\\', /* '\\' */ |
|
| 46 | + self::T_BACKSPACE => "\u{0008}", /* '\b' */ |
|
| 47 | + self::T_FORM_FEED => "\u{000C}", /* '\f' */ |
|
| 48 | + self::T_NEW_LINE => "\u{000A}", /* '\n' */ |
|
| 49 | + self::T_CARRIAGE_RETURN => "\u{000D}", /* '\r' */ |
|
| 50 | + self::T_HORIZONTAL_TAB => "\u{0009}", /* '\t' */ |
|
| 51 | + self::T_ESCAPED_QUOTE => '"', /* '\"' */ |
|
| 52 | + self::T_ESCAPED_BACK_SLASH => '\\', /* '\\' */ |
|
| 53 | 53 | ]; |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | public static function parse(string $value): self |
| 65 | 65 | { |
| 66 | - if (! \is_numeric($value)) { |
|
| 66 | + if (!\is_numeric($value)) { |
|
| 67 | 67 | $message = 'Int cannot represent non-numeric value: %s'; |
| 68 | 68 | throw new \OverflowException(\sprintf($message, $value)); |
| 69 | 69 | } |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function __construct(array $items) |
| 29 | 29 | { |
| 30 | - parent::__construct(fn ($item) => $item instanceof NamedTypeNode, $items); |
|
| 30 | + parent::__construct(fn($item) => $item instanceof NamedTypeNode, $items); |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | public function build(iterable $ast, Document $dictionary = null): DocumentInterface |
| 149 | 149 | { |
| 150 | 150 | $registry = new Registry(); |
| 151 | - $dictionary ??= $this->document; |
|
| 151 | + $dictionary ?? = $this->document; |
|
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | 154 | * First tree walk: |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | { |
| 201 | 201 | $source = File::new($source); |
| 202 | 202 | |
| 203 | - return $this->cache[$this->hash($source)] ??= $this->parser->parse($source); |
|
| 203 | + return $this->cache[$this->hash($source)] ?? = $this->parser->parse($source); |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | */ |
| 233 | 233 | public function withType(NamedTypeInterface $type, bool $overwrite = false): self |
| 234 | 234 | { |
| 235 | - if ($overwrite || ! isset($this->document->typeMap[$type->getName()])) { |
|
| 235 | + if ($overwrite || !isset($this->document->typeMap[$type->getName()])) { |
|
| 236 | 236 | $this->document->typeMap[$type->getName()] = $type; |
| 237 | 237 | } |
| 238 | 238 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | public function withDirective(DirectiveInterface $directive, bool $overwrite = false): self |
| 246 | 246 | { |
| 247 | - if ($overwrite || ! isset($this->document->directives[$directive->getName()])) { |
|
| 247 | + if ($overwrite || !isset($this->document->directives[$directive->getName()])) { |
|
| 248 | 248 | $this->document->directives[$directive->getName()] = $directive; |
| 249 | 249 | } |
| 250 | 250 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | */ |
| 257 | 257 | public function withSchema(SchemaInterface $schema, bool $overwrite = false): self |
| 258 | 258 | { |
| 259 | - if ($overwrite || ! $this->document->schema) { |
|
| 259 | + if ($overwrite || !$this->document->schema) { |
|
| 260 | 260 | $this->document->schema = $schema; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | public function cancelAutoload(callable $loader): self |
| 297 | 297 | { |
| 298 | - $this->loaders = \array_filter($this->loaders, static function (callable $haystack) use ($loader): bool { |
|
| 298 | + $this->loaders = \array_filter($this->loaders, static function(callable $haystack) use ($loader): bool { |
|
| 299 | 299 | return $haystack !== $loader; |
| 300 | 300 | }); |
| 301 | 301 | |