@@ -58,6 +58,6 @@ |
||
58 | 58 | */ |
59 | 59 | public function __toString(): string |
60 | 60 | { |
61 | - return $this->getName() . ': ' . $this->getHint()->getFullyQualifiedName(); |
|
61 | + return $this->getName().': '.$this->getHint()->getFullyQualifiedName(); |
|
62 | 62 | } |
63 | 63 | } |
@@ -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 | /** |
@@ -30,6 +30,6 @@ |
||
30 | 30 | */ |
31 | 31 | public static function match(string $lexeme, string $value): bool |
32 | 32 | { |
33 | - return (bool)\preg_match(self::pattern($lexeme), $value); |
|
33 | + return (bool) \preg_match(self::pattern($lexeme), $value); |
|
34 | 34 | } |
35 | 35 | } |
@@ -116,13 +116,13 @@ |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | |
119 | - echo \str_repeat('=', 60) . "\n"; |
|
120 | - echo \sprintf('| %5s | %-48s |', 'ID', 'VARIABLE') . "\n"; |
|
121 | - echo \str_repeat('-', 60) . "\n"; |
|
119 | + echo \str_repeat('=', 60)."\n"; |
|
120 | + echo \sprintf('| %5s | %-48s |', 'ID', 'VARIABLE')."\n"; |
|
121 | + echo \str_repeat('-', 60)."\n"; |
|
122 | 122 | foreach ($this->table as $id => $var) { |
123 | - echo \sprintf('| %5d | %-48s |', $id, $var) . "\n"; |
|
123 | + echo \sprintf('| %5d | %-48s |', $id, $var)."\n"; |
|
124 | 124 | } |
125 | - echo \str_repeat('=', 60) . "\n"; |
|
125 | + echo \str_repeat('=', 60)."\n"; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -28,5 +28,5 @@ |
||
28 | 28 | * @param TypeInterface|null $type |
29 | 29 | * @return VarSymbolInterface |
30 | 30 | */ |
31 | - public function declare(string $var, TypeInterface $type = null): VarSymbolInterface; |
|
31 | + public function declare(string$var,TypeInterface$type=null): VarSymbolInterface; |
|
32 | 32 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | * @param TypeInterface|null $type |
129 | 129 | * @return VarSymbolInterface |
130 | 130 | */ |
131 | - public function declare(string $var, TypeInterface $type = null): VarSymbolInterface |
|
131 | + public function declare(string$var,TypeInterface$type=null): VarSymbolInterface |
|
132 | 132 | { |
133 | 133 | $record = new VarSymbol($var, $type); |
134 | 134 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | protected function verified(string $name): string |
50 | 50 | { |
51 | - if (! \preg_match('/^[_a-zA-Z][_a-zA-Z0-9]*$/', $name)) { |
|
51 | + if (!\preg_match('/^[_a-zA-Z][_a-zA-Z0-9]*$/', $name)) { |
|
52 | 52 | $error = \sprintf('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "%s" does not.', $name); |
53 | 53 | throw new SemanticException($error); |
54 | 54 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function offsetExists($offset): bool |
151 | 151 | { |
152 | - return $this->has((string)$offset); |
|
152 | + return $this->has((string) $offset); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function offsetGet($offset) |
160 | 160 | { |
161 | - return $this->get((string)$offset); |
|
161 | + return $this->get((string) $offset); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | */ |
168 | 168 | public function offsetSet($offset, $value): void |
169 | 169 | { |
170 | - $this->set((string)$offset, $value); |
|
170 | + $this->set((string) $offset, $value); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -175,6 +175,6 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function offsetUnset($offset): void |
177 | 177 | { |
178 | - $this->delete((string)$offset); |
|
178 | + $this->delete((string) $offset); |
|
179 | 179 | } |
180 | 180 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @param VarSymbolInterface $record |
21 | 21 | * @return int |
22 | 22 | */ |
23 | - public function declare(VarSymbolInterface $record): int; |
|
23 | + public function declare(VarSymbolInterface$record): int; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @param int $addr |