protected function getMethodReflection($method, $class = null)
    {
        if (is_object($method) && $method instanceof \ReflectionMethod) {
            return $method;
        }
        if ($class === null) {
            throw new InvalidArgumentException("Argument 'class' must be set");
        }
        return ReflectionHelper::getMethodReflection($class, $method);
    }