Code Duplication    Length = 13-13 lines in 2 locations

src/Context.php 2 locations

@@ 380-392 (lines=13) @@
377
     *
378
     * @return int the appropriate flag for the symbol type
379
     */
380
    public static function isSymbol($str)
381
    {
382
        if (strlen($str) == 0) {
383
            return null;
384
        }
385
        if ($str[0] === '@') {
386
            return Token::FLAG_SYMBOL_VARIABLE;
387
        } elseif ($str[0] === '`') {
388
            return Token::FLAG_SYMBOL_BACKTICK;
389
        }
390
391
        return null;
392
    }
393
394
    // -------------------------------------------------------------------------
395
    // String.
@@ 404-416 (lines=13) @@
401
     *
402
     * @return int the appropriate flag for the string type
403
     */
404
    public static function isString($str)
405
    {
406
        if (strlen($str) == 0) {
407
            return null;
408
        }
409
        if ($str[0] === '\'') {
410
            return Token::FLAG_STRING_SINGLE_QUOTES;
411
        } elseif ($str[0] === '"') {
412
            return Token::FLAG_STRING_DOUBLE_QUOTES;
413
        }
414
415
        return null;
416
    }
417
418
    // -------------------------------------------------------------------------
419
    // Delimiter.