public function build($concrete)
    {
        $reflection = new \ReflectionClass($concrete);

        if (! $reflection->isInstantiable()) {
            throw new \InvalidArgumentException(sprintf('Class %s is not instantiable.', $concrete));
        }

        $constructor = $reflection->getConstructor();

        if (is_null($constructor)) {
            return new $concrete;
        }

        $dependencies = $this->getDependencies($constructor);

        return $reflection->newInstanceArgs($dependencies);
    }