Code Duplication    Length = 13-13 lines in 2 locations

src/Context.php 2 locations

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