mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-22 03:22:44 +05:30
Added code coverage ignore comments
This commit is contained in:
parent
8f0cb0e78c
commit
3b4a8cf5f3
@ -38,11 +38,13 @@ class AuthenticationServerMiddleware
|
|||||||
$response = $this->server->respondToRequest($request, $response);
|
$response = $this->server->respondToRequest($request, $response);
|
||||||
} catch (OAuthServerException $exception) {
|
} catch (OAuthServerException $exception) {
|
||||||
return $exception->generateHttpResponse($response);
|
return $exception->generateHttpResponse($response);
|
||||||
|
// @codeCoverageIgnoreStart
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
$body = new Stream('php://temp', 'r+');
|
$body = new Stream('php://temp', 'r+');
|
||||||
$body->write($exception->getMessage());
|
$body->write($exception->getMessage());
|
||||||
|
|
||||||
return $response->withStatus(500)->withBody($body);
|
return $response->withStatus(500)->withBody($body);
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($response->getStatusCode(), [400, 401, 500])) {
|
if (in_array($response->getStatusCode(), [400, 401, 500])) {
|
||||||
|
@ -38,11 +38,13 @@ class ResourceServerMiddleware
|
|||||||
$request = $this->server->validateRequest($request);
|
$request = $this->server->validateRequest($request);
|
||||||
} catch (OAuthServerException $exception) {
|
} catch (OAuthServerException $exception) {
|
||||||
return $exception->generateHttpResponse($response);
|
return $exception->generateHttpResponse($response);
|
||||||
|
// @codeCoverageIgnoreStart
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
$body = new Stream('php://temp', 'r+');
|
$body = new Stream('php://temp', 'r+');
|
||||||
$body->write($exception->getMessage());
|
$body->write($exception->getMessage());
|
||||||
|
|
||||||
return $response->withStatus(500)->withBody($body);
|
return $response->withStatus(500)->withBody($body);
|
||||||
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass the request and response on to the next responder in the chain
|
// Pass the request and response on to the next responder in the chain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user