This PR removes a redundant check in the conditional within the Utils::getStatusCode() method.
Within the body of Utils::getStatusCode() a call is made to ResponseInterface::getStatusCode(). This method is documented to return an integer. The only scenario where ! $status would evaluate to true is whenever a statuscode of 0 is returned. This case is also covered by the check $status < 400 and could therefore be safely removed.
A test case is added to demonstrate that the same resultant status code is obtained.
If there is anything I overlooked please let me know!
Signed-off-by: Remy Bos 27890746+sjokkateer@users.noreply.github.com
Description
This PR removes a redundant check in the conditional within the
Utils::getStatusCode()
method.Within the body of
Utils::getStatusCode()
a call is made to ResponseInterface::getStatusCode(). This method is documented to return an integer. The only scenario where! $status
would evaluate to true is whenever a statuscode of0
is returned. This case is also covered by the check$status < 400
and could therefore be safely removed.A test case is added to demonstrate that the same resultant status code is obtained.
If there is anything I overlooked please let me know!