You are here

private function MessageTrait::assertHeader in Auth0 Single Sign On 8.2

3 calls to MessageTrait::assertHeader()
MessageTrait::setHeaders in vendor/guzzlehttp/psr7/src/MessageTrait.php
MessageTrait::withAddedHeader in vendor/guzzlehttp/psr7/src/MessageTrait.php
MessageTrait::withHeader in vendor/guzzlehttp/psr7/src/MessageTrait.php

File

vendor/guzzlehttp/psr7/src/MessageTrait.php, line 200

Class

MessageTrait
Trait implementing functionality common to requests and responses.

Namespace

GuzzleHttp\Psr7

Code

private function assertHeader($header) {
  if (!is_string($header)) {
    throw new \InvalidArgumentException(sprintf('Header name must be a string but %s provided.', is_object($header) ? get_class($header) : gettype($header)));
  }
  if ($header === '') {
    throw new \InvalidArgumentException('Header name can not be empty.');
  }
}