public function build(Injector $injector = null): Injector
    {
        if ($injector === null) {
            $injector = new Injector();
        }

        foreach ($this->configs as $config) {
            $config->apply($injector);
        }

        return $injector;
    }