protected function getStatusCode(\Exception $exception)
    {
        // If matched
        if ($statusCode = $this->exceptionCodes->resolveException($exception)) {
            return $statusCode;
        }

        // Otherwise, default
        if ($exception instanceof HttpExceptionInterface) {
            return $exception->getStatusCode();
        }

        return 500;
    }
protected function getStatusCode(\Exception $exception)
    {
        // If matched
        if ($statusCode = $this->exceptionCodes->resolveException($exception)) {
            return $statusCode;
        }

        // Otherwise, default
        if ($exception instanceof HttpExceptionInterface) {
            return $exception->getStatusCode();
        }

        return 500;
    }
protected function getStatusCode ( \ Exception $ exception ) { // If matched if ( $ statusCode = $ this -> exceptionCodes -> resolveException ( $ exception ) ) { return $ statusCode ; } // Otherwise, default if ( $ exception instanceof HttpExceptionInterface ) { return $ exception -> getStatusCode ( ) ; } return 500 ; }
Determines the status code to use for the response.

@param \Exception $exception

@return int
Determines the status code to use for the response .