src/Message.php
private function checkHeaders(array $headers)
    {
        foreach ($headers as $key => $value) {
            Assertion::string($key, 'Header key must be a string');
            Assertion::notBlank($key, 'Header key must be a non empty string');
            Assertion::notNull($value, 'Value cannot be null');

            if (!is_string($value) &&
                !is_numeric($value) &&
                !is_bool($value)
            ) {
                throw new \InvalidArgumentException('Value must be a string, a number or a boolean.');
            }
        }
    }
private function checkHeaders(array $headers)
    {
        foreach ($headers as $key => $value) {
            Assertion::string($key, 'Header key must be a string');
            Assertion::notBlank($key, 'Header key must be a non empty string');
            Assertion::notNull($value, 'Value cannot be null');

            if (!is_string($value) &&
                !is_numeric($value) &&
                !is_bool($value)
            ) {
                throw new \InvalidArgumentException('Value must be a string, a number or a boolean.');
            }
        }
    }
@param string[] $headers

@throws AssertionFailedException
@throws \InvalidArgumentException