public function build(): Swap
    {
        $serviceFactory = new Factory($this->httpClient, $this->requestFactory);
        $services = [];

        foreach ($this->services as $name => $options) {
            $services[] = $serviceFactory->create($name, $options);
        }

        $service = new Chain($services);
        $exchanger = new Exchanger($service, $this->cache, $this->options);

        return new Swap($exchanger);
    }
public function build(): Swap
    {
        $serviceFactory = new Factory($this->httpClient, $this->requestFactory);
        $services = [];

        foreach ($this->services as $name => $options) {
            $services[] = $serviceFactory->create($name, $options);
        }

        $service = new Chain($services);
        $exchanger = new Exchanger($service, $this->cache, $this->options);

        return new Swap($exchanger);
    }
public function build ( ) : Swap { $ serviceFactory = new Factory ( $ this -> httpClient , $ this -> requestFactory ) ; $ services = [ ] ; foreach ( $ this -> services as $ name => $ options ) { $ services [ ] = $ serviceFactory -> create ( $ name , $ options ) ; } $ service = new Chain ( $ services ) ; $ exchanger = new Exchanger ( $ service , $ this -> cache , $ this -> options ) ; return new Swap ( $ exchanger ) ; }
Builds Swap.

@return Swap
Builds Swap .