@@ -62,7 +62,7 @@ |
||
62 | 62 | ->withArgument((new ArgumentDefinition($this, 'reason', 'String')) |
63 | 63 | ->withLine(39) |
64 | 64 | ->withDefaultValue('No longer supported')) |
65 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
65 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
66 | 66 | return new DirectiveLocation($this, $location); |
67 | 67 | }, self::LOCATIONS)); |
68 | 68 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | /** |
32 | 32 | * @var string |
33 | 33 | */ |
34 | - public const INTROSPECTION_SCHEMA_PATH = __DIR__ . '/../../resources/introspection.graphqls'; |
|
34 | + public const INTROSPECTION_SCHEMA_PATH = __DIR__.'/../../resources/introspection.graphqls'; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * IntrospectionDocument constructor. |
@@ -32,7 +32,7 @@ |
||
32 | 32 | /** |
33 | 33 | * @var string |
34 | 34 | */ |
35 | - public const STDLIB_SCHEMA_PATH = __DIR__ . '/../../resources/stdlib.graphqls'; |
|
35 | + public const STDLIB_SCHEMA_PATH = __DIR__.'/../../resources/stdlib.graphqls'; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * GraphQLDocument constructor. |
@@ -50,8 +50,8 @@ |
||
50 | 50 | private function invoke(string $name, Definition $from = null): void |
51 | 51 | { |
52 | 52 | foreach ($this->callbacks as $callback) { |
53 | - if (! $this->has($name)) { |
|
54 | - $callback($name, $from, function (TypeDefinition $type): void { |
|
53 | + if (!$this->has($name)) { |
|
54 | + $callback($name, $from, function(TypeDefinition $type): void { |
|
55 | 55 | $this->add($type); |
56 | 56 | }); |
57 | 57 | } |
@@ -34,6 +34,6 @@ |
||
34 | 34 | */ |
35 | 35 | public function __toString(): string |
36 | 36 | { |
37 | - return '@' . parent::__toString(); |
|
37 | + return '@'.parent::__toString(); |
|
38 | 38 | } |
39 | 39 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function __toString(): string |
66 | 66 | { |
67 | 67 | try { |
68 | - $parent = (string)$this->getDefinition(); |
|
68 | + $parent = (string) $this->getDefinition(); |
|
69 | 69 | } catch (\Throwable $e) { |
70 | 70 | $parent = '?<?>'; |
71 | 71 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | if ($this->isList()) { |
78 | - $parent = '[' . $parent . ']'; |
|
78 | + $parent = '['.$parent.']'; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | if ($this->isListOfNonNulls()) { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function isNonNull(): bool |
93 | 93 | { |
94 | - return (bool)($this->modifiers & ProvidesTypeIndication::IS_NOT_NULL); |
|
94 | + return (bool) ($this->modifiers & ProvidesTypeIndication::IS_NOT_NULL); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function isList(): bool |
101 | 101 | { |
102 | - return (bool)($this->modifiers & ProvidesTypeIndication::IS_LIST); |
|
102 | + return (bool) ($this->modifiers & ProvidesTypeIndication::IS_LIST); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function isListOfNonNulls(): bool |
109 | 109 | { |
110 | - return (bool)($this->modifiers & ProvidesTypeIndication::IS_LIST_OF_NOT_NULL); |
|
110 | + return (bool) ($this->modifiers & ProvidesTypeIndication::IS_LIST_OF_NOT_NULL); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function parse($value): string |
53 | 53 | { |
54 | - if (! \is_scalar($value)) { |
|
54 | + if (!\is_scalar($value)) { |
|
55 | 55 | throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value))); |
56 | 56 | } |
57 | 57 | |
58 | - return (string)parent::parse($value); |
|
58 | + return (string) parent::parse($value); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function serialize($value): string |
67 | 67 | { |
68 | - if (! \is_scalar($value)) { |
|
68 | + if (!\is_scalar($value)) { |
|
69 | 69 | throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value))); |
70 | 70 | } |
71 | 71 | |
72 | - return (string)parent::serialize($value); |
|
72 | + return (string) parent::serialize($value); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function parse($value): bool |
48 | 48 | { |
49 | - if (! \is_scalar($value)) { |
|
49 | + if (!\is_scalar($value)) { |
|
50 | 50 | throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value))); |
51 | 51 | } |
52 | 52 | |
53 | - return (bool)parent::parse($value); |
|
53 | + return (bool) parent::parse($value); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function serialize($value): bool |
62 | 62 | { |
63 | - if (! \is_scalar($value)) { |
|
63 | + if (!\is_scalar($value)) { |
|
64 | 64 | throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value))); |
65 | 65 | } |
66 | 66 | |
67 | - return (bool)parent::serialize($value); |
|
67 | + return (bool) parent::serialize($value); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function parse($value): float |
48 | 48 | { |
49 | - if (! \is_scalar($value)) { |
|
49 | + if (!\is_scalar($value)) { |
|
50 | 50 | throw new TypeConflictException(\sprintf('Could not parse %s type', \gettype($value))); |
51 | 51 | } |
52 | 52 | |
53 | - return (float)parent::parse($value); |
|
53 | + return (float) parent::parse($value); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function serialize($value): float |
62 | 62 | { |
63 | - if (! \is_scalar($value)) { |
|
63 | + if (!\is_scalar($value)) { |
|
64 | 64 | throw new TypeConflictException(\sprintf('Could not serialize %s type', \gettype($value))); |
65 | 65 | } |
66 | 66 | |
67 | - return (float)parent::serialize($value); |
|
67 | + return (float) parent::serialize($value); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |