@@ -20,11 +20,9 @@ |
||
20 | 20 | use Railt\SDL\Frontend\AST\Support\DirectivesProvider; |
21 | 21 | use Railt\SDL\Frontend\AST\Support\TypeNameProvider; |
22 | 22 | use Railt\SDL\Frontend\Context; |
23 | -use Railt\SDL\Frontend\IR\Opcode; |
|
24 | 23 | use Railt\SDL\Frontend\IR\Opcode\AttachOpcode; |
25 | 24 | use Railt\SDL\Frontend\IR\Opcode\DefineOpcode; |
26 | 25 | use Railt\SDL\Frontend\IR\Opcode\DescriptionOpcode; |
27 | -use Railt\SDL\Frontend\IR\Value\StringValue; |
|
28 | 26 | use Railt\SDL\Frontend\IR\Value\TypeValue; |
29 | 27 | |
30 | 28 | /** |
@@ -15,11 +15,8 @@ |
||
15 | 15 | use Railt\SDL\Frontend\AST\Support\DependentNameProvider; |
16 | 16 | use Railt\SDL\Frontend\Context; |
17 | 17 | use Railt\SDL\Frontend\IR\Opcode\AttachOpcode; |
18 | -use Railt\SDL\Frontend\IR\Opcode\CallOpcode; |
|
19 | 18 | use Railt\SDL\Frontend\IR\Opcode\CompareOpcode; |
20 | 19 | use Railt\SDL\Frontend\IR\Opcode\FetchOpcode; |
21 | -use Railt\SDL\Frontend\IR\Value\ConstantValue; |
|
22 | -use Railt\SDL\Frontend\IR\Value\StringValue; |
|
23 | 20 | use Railt\SDL\Frontend\IR\Value\ValueInterface; |
24 | 21 | |
25 | 22 | /** |
@@ -19,7 +19,6 @@ |
||
19 | 19 | use Railt\SDL\Frontend\Context; |
20 | 20 | use Railt\SDL\Frontend\IR\JoinedOpcode; |
21 | 21 | use Railt\SDL\Frontend\IR\Opcode\AttachOpcode; |
22 | -use Railt\SDL\Frontend\IR\Opcode\CallOpcode; |
|
23 | 22 | use Railt\SDL\Frontend\IR\Opcode\CompareOpcode; |
24 | 23 | use Railt\SDL\Frontend\IR\Opcode\FetchDeepOpcode; |
25 | 24 | use Railt\SDL\Frontend\IR\Opcode\NewOpcode; |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use Railt\Reflection\Type; |
16 | 16 | use Railt\SDL\Frontend\AST\ProvidesType; |
17 | 17 | use Railt\SDL\Frontend\IR\Value\InputValue; |
18 | -use Railt\SDL\Frontend\IR\Value\StringValue; |
|
19 | 18 | use Railt\SDL\Frontend\IR\Value\ValueInterface; |
20 | 19 | |
21 | 20 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** @var Readable $file */ |
31 | 31 | $file = $opcode->getOperand(0); |
32 | 32 | |
33 | - if (! $file instanceof Readable) { |
|
33 | + if (!$file instanceof Readable) { |
|
34 | 34 | $error = 'First operand of (#%d) %s should be instance of %s'; |
35 | 35 | throw new VmException($opcode, $error, $opcode->getId(), $opcode->getName(), Readable::class); |
36 | 36 | } |
@@ -55,8 +55,8 @@ |
||
55 | 55 | */ |
56 | 56 | foreach ($runtime->execute($opcodes) as $opcode => $result) { |
57 | 57 | if ($this->logger) { |
58 | - $value = \get_class($result) . '#' . \spl_object_hash($result); |
|
59 | - $message = \sprintf('%4s = %s', '#' . $opcode->getId(), $value); |
|
58 | + $value = \get_class($result).'#'.\spl_object_hash($result); |
|
59 | + $message = \sprintf('%4s = %s', '#'.$opcode->getId(), $value); |
|
60 | 60 | |
61 | 61 | $this->logger->debug($message); |
62 | 62 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | $queue = $this->priorities[$index] ?? null; |
56 | 56 | |
57 | - if (! $queue) { |
|
57 | + if (!$queue) { |
|
58 | 58 | $this->priorities[$index] = new \SplQueue(); |
59 | 59 | } |
60 | 60 |
@@ -27,6 +27,6 @@ |
||
27 | 27 | /** @var LeafInterface $token */ |
28 | 28 | $token = $this->getChild(0); |
29 | 29 | |
30 | - return new ConstantValue((string)$token->getValue(), $this->getOffset()); |
|
30 | + return new ConstantValue((string) $token->getValue(), $this->getOffset()); |
|
31 | 31 | } |
32 | 32 | } |
@@ -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) { |