src/MessageTrait.php
public function getHeaderLine($header)
    {
        $value = $this->getHeader($header);
        if (empty($value)) {
            return null;
        }

        return implode(',', $value);
    }
public function getHeaderLine($header)
    {
        $value = $this->getHeader($header);
        if (empty($value)) {
            return null;
        }

        return implode(',', $value);
    }
public function getHeaderLine ( $ header ) { $ value = $ this -> getHeader ( $ header ) ; if ( empty ( $ value ) ) { return null ; } return implode ( ',' , $ value ) ; }
Retrieves the line for a single header, with the header values as a
comma-separated string.

This method returns all of the header values of the given
case-insensitive header name as a string concatenated together using
a comma.

NOTE: Not all header values may be appropriately represented using
comma concatenation. For such headers, use getHeader() instead
and supply your own delimiter when concatenating.

If the header does not appear in the message, this method MUST return
a null value.

@param string $name Case-insensitive header field name.
@return string|null A string of values as provided for the given header
concatenated together using a comma. If the header does not appear in
the message, this method MUST return a null value.
Retrieves the line for a single header with the header values as a comma - separated string .