@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return $this->parseInt($value->getValue()); |
53 | 53 | } |
54 | 54 | |
55 | - return (float)$value->getValue(); |
|
55 | + return (float) $value->getValue(); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function parseExponential(string $value): float |
81 | 81 | { |
82 | - return (float)$value; |
|
82 | + return (float) $value; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function parseFloat(string $value): float |
90 | 90 | { |
91 | - return (float)$value; |
|
91 | + return (float) $value; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | private function renderUtfSequences(string $body): string |
95 | 95 | { |
96 | - $callee = function (array $matches): string { |
|
96 | + $callee = function(array $matches): string { |
|
97 | 97 | [$char, $code] = [$matches[0], $matches[1]]; |
98 | 98 | |
99 | 99 | try { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | try { |
125 | 125 | if (\function_exists('\\json_decode')) { |
126 | - $result = @\json_decode('{"char": "' . $body . '"}')->char; |
|
126 | + $result = @\json_decode('{"char": "'.$body.'"}')->char; |
|
127 | 127 | |
128 | 128 | if (\json_last_error() === \JSON_ERROR_NONE) { |
129 | 129 | $body = $result; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function renderSpecialCharacters(string $body): string |
145 | 145 | { |
146 | - $callee = function (array $matches): string { |
|
146 | + $callee = function(array $matches): string { |
|
147 | 147 | [$char, $code] = [$matches[0], $matches[1]]; |
148 | 148 | |
149 | 149 | switch ($code) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function compile(Readable $file): DocumentInterface |
101 | 101 | { |
102 | - return $this->store->memoize($file, function (Readable $file): DocumentInterface { |
|
102 | + return $this->store->memoize($file, function(Readable $file): DocumentInterface { |
|
103 | 103 | return $this->generate($file, $this->ir($file)); |
104 | 104 | }); |
105 | 105 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function generate(Readable $file, $opcodes): DocumentInterface |
116 | 116 | { |
117 | - return $this->wrap(function () use ($file, $opcodes) { |
|
117 | + return $this->wrap(function() use ($file, $opcodes) { |
|
118 | 118 | return $this->back->run($file, $opcodes); |
119 | 119 | }); |
120 | 120 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function ir(Readable $readable) |
151 | 151 | { |
152 | - return $this->wrap(function () use ($readable) { |
|
152 | + return $this->wrap(function() use ($readable) { |
|
153 | 153 | return $this->front->load($readable); |
154 | 154 | }); |
155 | 155 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * @var string |
39 | 39 | */ |
40 | - public const INTERFACE = 'Interface'; |
|
40 | + public const interface = 'Interface'; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @var string |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | self::SCHEMA, |
120 | 120 | self::SCALAR, |
121 | 121 | self::OBJECT, |
122 | - self::INTERFACE, |
|
122 | + self::interface, |
|
123 | 123 | self::UNION, |
124 | 124 | self::ENUM, |
125 | 125 | self::INPUT_OBJECT, |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | public const ALLOWS_TO_OUTPUT = [ |
148 | 148 | self::SCALAR, |
149 | 149 | self::OBJECT, |
150 | - self::INTERFACE, |
|
150 | + self::interface, |
|
151 | 151 | self::UNION, |
152 | 152 | self::ENUM, |
153 | 153 | self::INPUT_OBJECT, |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @var string[]|array[] |
165 | 165 | */ |
166 | 166 | public const INHERITANCE_TREE = [ |
167 | - self::INTERFACE => [ |
|
167 | + self::interface => [ |
|
168 | 168 | self::OBJECT => [ |
169 | 169 | self::INPUT_OBJECT, |
170 | 170 | ], |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @param TypeInterface $type |
217 | 217 | * @return bool |
218 | 218 | */ |
219 | - public function instanceOf(self $type): bool; |
|
219 | + public function instanceof(self $type): bool; |
|
220 | 220 | |
221 | 221 | /** |
222 | 222 | * Returns true if the type is the same as the current type. |