@@ -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 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | public function build(iterable $ast, Document $dictionary = null): DocumentInterface |
150 | 150 | { |
151 | 151 | $registry = new Registry(); |
152 | - $dictionary ??= $this->document; |
|
152 | + $dictionary ?? = $this->document; |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * First tree walk: |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $source = File::new($source); |
210 | 210 | |
211 | - return $this->cache[$this->hash($source)] ??= $this->parser->parse($source); |
|
211 | + return $this->cache[$this->hash($source)] ?? = $this->parser->parse($source); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public function withType(NamedTypeInterface $type, bool $overwrite = false): self |
242 | 242 | { |
243 | - if ($overwrite || ! $this->document->hasType($type->getName())) { |
|
243 | + if ($overwrite || !$this->document->hasType($type->getName())) { |
|
244 | 244 | $this->document->addType($type); |
245 | 245 | } |
246 | 246 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | public function withDirective(DirectiveInterface $directive, bool $overwrite = false): self |
254 | 254 | { |
255 | - if ($overwrite || ! $this->document->hasDirective($directive->getName())) { |
|
255 | + if ($overwrite || !$this->document->hasDirective($directive->getName())) { |
|
256 | 256 | $this->document->addDirective($directive); |
257 | 257 | } |
258 | 258 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function withSchema(SchemaInterface $schema, bool $overwrite = false): self |
266 | 266 | { |
267 | - if ($overwrite || ! $this->document->getSchema()) { |
|
267 | + if ($overwrite || !$this->document->getSchema()) { |
|
268 | 268 | $this->document->setSchema($schema); |
269 | 269 | } |
270 | 270 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | */ |
304 | 304 | public function cancelAutoload(callable $loader): self |
305 | 305 | { |
306 | - $this->loaders = \array_filter($this->loaders, static function (callable $haystack) use ($loader): bool { |
|
306 | + $this->loaders = \array_filter($this->loaders, static function(callable $haystack) use ($loader): bool { |
|
307 | 307 | return $haystack !== $loader; |
308 | 308 | }); |
309 | 309 |