Code Duplication    Length = 10-10 lines in 2 locations

src/Context.php 2 locations

@@ 375-384 (lines=10) @@
372
     *
373
     * @return int the appropriate flag for the symbol type
374
     */
375
    public static function isSymbol($str)
376
    {
377
        if ($str[0] === '@') {
378
            return Token::FLAG_SYMBOL_VARIABLE;
379
        } elseif ($str[0] === '`') {
380
            return Token::FLAG_SYMBOL_BACKTICK;
381
        }
382
383
        return null;
384
    }
385
386
    // -------------------------------------------------------------------------
387
    // String.
@@ 396-405 (lines=10) @@
393
     *
394
     * @return int the appropriate flag for the string type
395
     */
396
    public static function isString($str)
397
    {
398
        if ($str[0] === '\'') {
399
            return Token::FLAG_STRING_SINGLE_QUOTES;
400
        } elseif ($str[0] === '"') {
401
            return Token::FLAG_STRING_DOUBLE_QUOTES;
402
        }
403
404
        return null;
405
    }
406
407
    // -------------------------------------------------------------------------
408
    // Delimiter.