Code Duplication    Length = 8-8 lines in 2 locations

src/Lexer.php 2 locations

@@ 284-291 (lines=8) @@
281
282
            // Handling delimiters.
283
            if ($token->type === Token::TYPE_NONE && $token->value === 'DELIMITER') {
284
                if ($this->last + 1 >= $this->len) {
285
                    $this->error(
286
                        'Expected whitespace(s) before delimiter.',
287
                        '',
288
                        $this->last + 1
289
                    );
290
                    continue;
291
                }
292
293
                // Skipping last R (from `delimiteR`) and whitespaces between
294
                // the keyword `DELIMITER` and the actual delimiter.
@@ 302-309 (lines=8) @@
299
                }
300
301
                // Preparing the token that holds the new delimiter.
302
                if ($this->last + 1 >= $this->len) {
303
                    $this->error(
304
                        'Expected delimiter.',
305
                        '',
306
                        $this->last + 1
307
                    );
308
                    continue;
309
                }
310
                $pos = $this->last + 1;
311
312
                // Parsing the delimiter.