Code Duplication    Length = 9-9 lines in 2 locations

src/Context.php 2 locations

@@ 365-373 (lines=9) @@
362
     *
363
     * @return int The appropriate flag for the symbol type.
364
     */
365
    public static function isSymbol($str)
366
    {
367
        if ($str[0] === '@') {
368
            return Token::FLAG_SYMBOL_VARIABLE;
369
        } elseif ($str[0] === '`') {
370
            return Token::FLAG_SYMBOL_BACKTICK;
371
        }
372
        return null;
373
    }
374
375
    // -------------------------------------------------------------------------
376
    // String.
@@ 385-393 (lines=9) @@
382
     *
383
     * @return int The appropriate flag for the string type.
384
     */
385
    public static function isString($str)
386
    {
387
        if ($str[0] === '\'') {
388
            return Token::FLAG_STRING_SINGLE_QUOTES;
389
        } elseif ($str[0] === '"') {
390
            return Token::FLAG_STRING_DOUBLE_QUOTES;
391
        }
392
        return null;
393
    }
394
395
    // -------------------------------------------------------------------------
396
    // Delimiter.