src/View/ApiProblemInjectResponse.php
protected function getStatusCodeFromApiProblem(ApiProblem $problem)
    {
        $problemData = $problem->toArray();
        $status = array_key_exists('status', $problemData) ? $problemData['status'] : 0;

        if ($status < 100 || $status >= 600) {
            return 500;
        }

        return $status;
    }
protected function getStatusCodeFromApiProblem(ApiProblem $problem)
    {
        $problemData = $problem->toArray();
        $status = array_key_exists('status', $problemData) ? $problemData['status'] : 0;

        if ($status < 100 || $status >= 600) {
            return 500;
        }

        return $status;
    }
protected function getStatusCodeFromApiProblem ( ApiProblem $ problem ) { $ problemData = $ problem -> toArray ( ) ; $ status = array_key_exists ( 'status' , $ problemData ) ? $ problemData [ 'status' ] : 0 ; if ( $ status < 100 || $ status >= 600 ) { return 500 ; } return $ status ; }
Retrieve the HTTP status from an ApiProblem object

Ensures that the status falls within the acceptable range (100 - 599).

@param  ApiProblem $problem
@return int
Retrieve the HTTP status from an ApiProblem object