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

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

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

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

        return $injector;
    }
public function build ( Injector $ injector = null ) : Injector { if ( $ injector === null ) { $ injector = new Injector ( ) ; } foreach ( $ this -> configs as $ config ) { $ config -> apply ( $ injector ) ; } return $ injector ; }
Build the injector using the provided configuration.
Build the injector using the provided configuration .