Set Psalm error level to 3; fix possibly null reason phrase in Response
This commit is contained in:
parent
29cfa34f17
commit
fe780e6b92
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="4"
|
||||
errorLevel="3"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class Response extends Message implements ResponseInterface
|
|||
|
||||
/**
|
||||
* @param int $statusCode
|
||||
* @return string|null
|
||||
* @return string
|
||||
*/
|
||||
private function getDefaultReasonPhraseForStatusCode($statusCode)
|
||||
{
|
||||
|
|
@ -167,9 +167,6 @@ class Response extends Message implements ResponseInterface
|
|||
510 => "Not Extended",
|
||||
511 => "Network Authentication Required"
|
||||
];
|
||||
if (isset($reasonPhraseLookup[$statusCode])) {
|
||||
return $reasonPhraseLookup[$statusCode];
|
||||
}
|
||||
return null;
|
||||
return $reasonPhraseLookup[$statusCode] ?? '';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue