public function resolve($subject, array $parameters = [])
    {
        if ($this->isClass($subject)) {
            return $this->resolveClass($subject, $parameters);
        }

        if ($this->isMethod($subject)) {
            return $this->resolveMethod($subject, $parameters);
        }

        if ($this->isFunction($subject)) {
            return $this->resolveFunction($subject, $parameters);
        }

        $subject = \is_object($subject) ? \get_class($subject) : $subject;

        throw new BindingResolutionException(\sprintf(
            '[%s] is not resolvable. Build stack : [%s]',
            $subject,
            \implode(', ', $this->buildStack)
        ));
    }