src/Assertions/AssertHeader.php
/**
     * Check if a header name and an optional value matches this assert.
     *
     * @param string      $headerName  The header name.
     * @param string|null $headerValue The header value.
     *
     * @return bool True if header name and value match, false otherwise.
     */
Check if a header name and an optional value matches this assert.
@param string      $headerName  The header name.
@param string|null $headerValue The header value.

@return bool True if header name and value match, false otherwise.
Check if a header name and an optional value matches this assert . @param string $headerName The header name . @param string|null $headerValue The header value . @return bool True if header name and value match false otherwise .
private function nameAndValueMatches(string $headerName, ?string $headerValue): bool
    {
        if (!$this->stringEqualsCaseInsensitive($this->headerName, $headerName)) {
            return false;
        }
        if ($this->headerValue === null) {
            return true;
        }
        if ($headerValue === null) {
            return false;
        }
        if (!$this->stringEquals($this->headerValue, $headerValue)) {
            return false;
        }
        return true;
    }
private function nameAndValueMatches ( string $ headerName , ? string $ headerValue ) : bool { if ( ! $ this -> stringEqualsCaseInsensitive ( $ this -> headerName , $ headerName ) ) { return false ; } if ( $ this -> headerValue === null ) { return true ; } if ( $ headerValue === null ) { return false ; } if ( ! $ this -> stringEquals ( $ this -> headerValue , $ headerValue ) ) { return false ; } return true ; }
Check if a header name and an optional value matches this assert.
Check if a header name and an optional value matches this assert .