final public function chain(PipeChainInterface $chain): PipeChainInterface
    {
        if ( $this->next instanceof PipeChainInterface ) {
            $this->next->chain($chain);
        }
        else {
            $this->next = $chain;
        }

        return $this;
    }
final public function chain(PipeChainInterface $chain): PipeChainInterface
    {
        if ( $this->next instanceof PipeChainInterface ) {
            $this->next->chain($chain);
        }
        else {
            $this->next = $chain;
        }

        return $this;
    }
final public function chain ( PipeChainInterface $ chain ) : PipeChainInterface { if ( $ this -> next instanceof PipeChainInterface ) { $ this -> next -> chain ( $ chain ) ; } else { $ this -> next = $ chain ; } return $ this ; }
appends the provided pipe to the end of the chain.

@param PipeChainInterface $chain
@return PipeChainInterface
appends the provided pipe to the end of the chain .