src/AbstractTransport.php
public function replaceHeaders(array $headers)
    {
        foreach ($headers as $key => $value) {
            $this->setHeader($key, $value);
        }
        return $this;
    }
public function replaceHeaders(array $headers)
    {
        foreach ($headers as $key => $value) {
            $this->setHeader($key, $value);
        }
        return $this;
    }
Replace Headers Value

@param array $headers collection headers array
@return static