protected function resolveDependency(ReflectionParameter $dep) {
        $depName = $dep->getName();

        if ($dep->getClass()) {
            $depName = $dep->getClass()->name;
        }

        // bound
        if (array_key_exists($depName, $this->bindings)) {
            return $this->resolve($depName);
        }

        // unbound
        if (class_exists('\\' . $depName)) {
            return $this->make($depName);
        }

        // check for default val
        if ($dep->isDefaultValueAvailable()) {
            return $dep->getDefaultValue();
        }

        throw new ResolutionException(
            "Unable to resolve dependency {$depName} for {$dep->getDeclaringClass()->name}"
        );
    }