protected function hasInternalMethod(string $name) : bool
    {
        static $methods = [];

        $class = get_class($this);
        if (isset($methods[$class][$name])) {
            return $methods[$class][$name];
        }

        $hasMethod = (new ReflectionClass($this))->hasMethod($name);
        $methods[$class][$name] = $hasMethod;

        return $hasMethod;
    }