src/Matchers/RepeatMatch.php
public static function match($password, array $userInputs = [])
    {
        $groups = static::group($password);
        $matches = [];

        $k = 0;
        foreach ($groups as $group) {
            $char = $group[0];
            $length = strlen($group);

            if ($length > 2) {
                $end = $k + $length - 1;
                $token = substr($password, $k, $end + 1);
                $matches[] = new static($password, $k, $end, $token, $char);
            }
            $k += $length;
        }

        return $matches;
    }
public static function match($password, array $userInputs = [])
    {
        $groups = static::group($password);
        $matches = [];

        $k = 0;
        foreach ($groups as $group) {
            $char = $group[0];
            $length = strlen($group);

            if ($length > 2) {
                $end = $k + $length - 1;
                $token = substr($password, $k, $end + 1);
                $matches[] = new static($password, $k, $end, $token, $char);
            }
            $k += $length;
        }

        return $matches;
    }
public static function match ( $ password , array $ userInputs = [ ] ) { $ groups = static :: group ( $ password ) ; $ matches = [ ] ; $ k = 0 ; foreach ( $ groups as $ group ) { $ char = $ group [ 0 ] ; $ length = strlen ( $ group ) ; if ( $ length > 2 ) { $ end = $ k + $ length - 1 ; $ token = substr ( $ password , $ k , $ end + 1 ) ; $ matches [ ] = new static ( $ password , $ k , $ end , $ token , $ char ) ; } $ k += $ length ; } return $ matches ; }
Match 3 or more repeated characters.

@copydoc Match::match()

@param       $password
@param array $userInputs

@return array
Match 3 or more repeated characters .