function Response::getStatusMessage
File
-
vendor/
composer/ composer/ src/ Composer/ Util/ Http/ Response.php, line 53
Class
- Response
- @phpstan-type Request array{url: non-empty-string, options?: mixed[], copyTo?: string|null}
Namespace
Composer\Util\HttpCode
public function getStatusMessage() : ?string {
$value = null;
foreach ($this->headers as $header) {
if (Preg::isMatch('{^HTTP/\\S+ \\d+}i', $header)) {
// In case of redirects, headers contain the headers of all responses
// so we can not return directly and need to keep iterating
$value = $header;
}
}
return $value;
}