phpstan 0.12.99

This commit is contained in:
Dylan K. Taylor
2021-10-09 19:33:43 +01:00
parent 58a95f8836
commit e38866c4ba
7 changed files with 56 additions and 25 deletions

View File

@ -233,6 +233,7 @@ class Internet{
}
if(!is_string($raw)) throw new AssumptionFailedError("curl_exec() should return string|false when CURLOPT_RETURNTRANSFER is set");
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if(!is_int($httpCode)) throw new AssumptionFailedError("curl_getinfo(CURLINFO_HTTP_CODE) always returns int");
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$rawHeaders = substr($raw, 0, $headerSize);
$body = substr($raw, $headerSize);