src/Matchers/SequenceMatch.php
protected static function getSequenceName($pos, $reverse = false)
    {
        $sequences = self::LOWER.self::UPPER.self::DIGITS;
        $end = strlen($sequences);
        if (!$reverse && $pos < strlen(self::LOWER)) {
            return 'lower';
        }

        if (!$reverse && $pos <= $end - strlen(self::DIGITS)) {
            return 'upper';
        }

        if (!$reverse) {
            return 'digits';
        }

        if ($pos < strlen(self::DIGITS)) {
            return 'digits';
        }

        if ($pos <= $end - strlen(self::LOWER)) {
            return 'upper';
        }

        return 'lower';
    }
protected static function getSequenceName($pos, $reverse = false)
    {
        $sequences = self::LOWER.self::UPPER.self::DIGITS;
        $end = strlen($sequences);
        if (!$reverse && $pos < strlen(self::LOWER)) {
            return 'lower';
        }

        if (!$reverse && $pos <= $end - strlen(self::DIGITS)) {
            return 'upper';
        }

        if (!$reverse) {
            return 'digits';
        }

        if ($pos < strlen(self::DIGITS)) {
            return 'digits';
        }

        if ($pos <= $end - strlen(self::LOWER)) {
            return 'upper';
        }

        return 'lower';
    }
protected static function getSequenceName ( $ pos , $ reverse = false ) { $ sequences = self :: LOWER . self :: UPPER . self :: DIGITS ; $ end = strlen ( $ sequences ) ; if ( ! $ reverse && $ pos < strlen ( self :: LOWER ) ) { return 'lower' ; } if ( ! $ reverse && $ pos <= $ end - strlen ( self :: DIGITS ) ) { return 'upper' ; } if ( ! $ reverse ) { return 'digits' ; } if ( $ pos < strlen ( self :: DIGITS ) ) { return 'digits' ; } if ( $ pos <= $ end - strlen ( self :: LOWER ) ) { return 'upper' ; } return 'lower' ; }
Name of sequence a sequences position belongs to.

@param int  $pos
@param bool $reverse

@return string
Name of sequence a sequences position belongs to .