Skip to content

Commit d41c519

Browse files
committed
Update MessageAbstract.php
1 parent 784bf15 commit d41c519

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Http/MessageAbstract.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,24 +284,28 @@ protected function validateHeader(string $header, $values = []): void
284284
}
285285

286286
if (!\is_string($values) && !\is_array($values)) {
287+
// @codeCoverageIgnoreStart
287288
throw new \InvalidArgumentException(
288289
\sprintf(
289290
'Values for header "%s" must be a string or array; %s given.',
290291
$header,
291292
\gettype($values)
292293
)
293294
);
295+
// @codeCoverageIgnoreEnd
294296
}
295297

296298
foreach ((array) $values as $value) {
297299
if (!\is_string($value)) {
300+
// @codeCoverageIgnoreStart
298301
throw new \InvalidArgumentException(
299302
\sprintf(
300303
'Values for header "%s" must contain only strings; %s given.',
301304
$header,
302305
\gettype($value)
303306
)
304307
);
308+
// @codeCoverageIgnoreEnd
305309
}
306310

307311
if (\preg_match("~(?:(?:(?<!\r)\n)|(?:\r(?!\n))|(?:\r\n(?![ \t])))~", $value)

0 commit comments

Comments
 (0)