src/Message/Message.php
public function hasHeader($name)
    {
        $key = $this->headerKey($name);
        return array_key_exists($key, $this->headers);
    }
public function hasHeader($name)
    {
        $key = $this->headerKey($name);
        return array_key_exists($key, $this->headers);
    }
Checks if a header exists by the given case-insensitive name.

@param string $name Case-insensitive header field name.
@return bool Returns true if any header names match the given header
name using a case-insensitive string comparison. Returns false if
no matching header name is found in the message.