protected function callResolver($resolver, $parameters)
    {
        if (is_string($resolver)) {
            return call_user_func_array($resolver, $parameters);
        }

        if (count($parameters) === 0) {
            return $resolver();
        }

        if (count($parameters) === 1) {
            return $resolver($parameters[0]);
        }

        if (count($parameters) === 2) {
            return $resolver($parameters[0], $parameters[1]);
        }

        if (count($parameters) === 3) {
            return $resolver($parameters[0], $parameters[1], $parameters[2]);
        }

        if (count($parameters) === 4) {
            return $resolver($parameters[0], $parameters[1], $parameters[2], $parameters[3]);
        }

        return call_user_func_array($resolver, $parameters);
    }