protected function getFirst($key)
    {
        foreach ($this->rules as $rule) {
            if (substr($rule, 0, strlen($key)) == $key) {
                $params = explode(':', $rule, 2);
                if (isset($params[1])) {
                    return intval($params[1]);
                }
            }
        }

        return '';
    }