@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | if ($this->isPunctuation($char)) { |
98 | 98 | return $this->readPunctuation(); |
99 | 99 | } |
100 | - $this->input->error('Cannot handle character: ' . $char . ' (ord: ' . ord($char) . ')'); |
|
100 | + $this->input->error('Cannot handle character: '.$char.' (ord: '.ord($char).')'); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | protected function skipComment() { |
104 | 104 | $this->readWhile( |
105 | - function ($char) { |
|
105 | + function($char) { |
|
106 | 106 | return $char != "\n"; |
107 | 107 | } |
108 | 108 | ); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->input->next(); |
139 | 139 | } |
140 | 140 | if ($this->input->peek() != '[') { |
141 | - $this->error('Unexpected character \'' . $this->input->peek() . '\', expected \'[\''); |
|
141 | + $this->error('Unexpected character \''.$this->input->peek().'\', expected \'[\''); |
|
142 | 142 | } |
143 | 143 | $this->input->next(); |
144 | 144 | while (!$this->input->eof()) { |
@@ -155,12 +155,12 @@ discard block |
||
155 | 155 | // we have an equal number of equal signs |
156 | 156 | if ($endNumberOfEqualsSigns == $startNumberOfEqualsSigns) { |
157 | 157 | if ($this->input->peek() != ']') { |
158 | - $this->error('Unexpected character \'' . $this->input->peek() . '\', expected \'[\''); |
|
158 | + $this->error('Unexpected character \''.$this->input->peek().'\', expected \'[\''); |
|
159 | 159 | } |
160 | 160 | $this->input->next(); |
161 | 161 | break; |
162 | 162 | } else { |
163 | - $str .= $char . str_repeat('=', $endNumberOfEqualsSigns); |
|
163 | + $str .= $char.str_repeat('=', $endNumberOfEqualsSigns); |
|
164 | 164 | } |
165 | 165 | } else { |
166 | 166 | $str .= $char; |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | protected function readNumber() { |
230 | 230 | $hasDot = false; |
231 | 231 | $number = $this->readWhile( |
232 | - function ($char) use (&$hasDot) { |
|
232 | + function($char) use (&$hasDot) { |
|
233 | 233 | if ($char == '.') { |
234 | 234 | if ($hasDot) { |
235 | 235 | return false; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | protected function readIdentifier() { |
250 | 250 | $first = false; |
251 | 251 | $identifier = $this->readWhile( |
252 | - function ($char) use (&$first) { |
|
252 | + function($char) use (&$first) { |
|
253 | 253 | if ($first) { |
254 | 254 | $first = false; |
255 | 255 | return $this->isStartIdentifierCharacter($char); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | * @expectedException \Vlaswinkel\Lua\ParseException |
220 | 220 | */ |
221 | 221 | public function testInvalidKeyword() { |
222 | - $parser = new Parser(new TokenStream(new InputStream('function'))); |
|
222 | + $parser = new Parser(new TokenStream(new InputStream('function'))); |
|
223 | 223 | |
224 | 224 | $node = $parser->parse(); |
225 | 225 | $this->assertEquals('test', $node->getName()); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | |
249 | 249 | public function testAdvancedTable() { |
250 | - $parser = new Parser(new TokenStream(new InputStream(file_get_contents(__DIR__ . '/advanced-test.lua')))); |
|
250 | + $parser = new Parser(new TokenStream(new InputStream(file_get_contents(__DIR__.'/advanced-test.lua')))); |
|
251 | 251 | |
252 | 252 | $parser->parse(); |
253 | 253 | } |