Code cleanup [skip ci]

This commit is contained in:
James Cole
2018-06-06 21:23:00 +02:00
parent 20044427b4
commit 4a12d4d156
75 changed files with 319 additions and 341 deletions

View File

@@ -132,20 +132,20 @@ class Handler extends ExceptionHandler
$doMailError = env('SEND_ERROR_MESSAGE', true);
if (
// if the user wants us to mail:
$doMailError === true &&
((
// and if is one of these error instances
$exception instanceof FireflyException
|| $exception instanceof ErrorException
|| $exception instanceof OAuthServerException
$doMailError === true
&& ((
// and if is one of these error instances
$exception instanceof FireflyException
|| $exception instanceof ErrorException
|| $exception instanceof OAuthServerException
)
|| (
// or this one, but it's a JSON exception.
$exception instanceof AuthenticationException
&& Request::expectsJson() === true
))
) {
)
|| (
// or this one, but it's a JSON exception.
$exception instanceof AuthenticationException
&& Request::expectsJson() === true
))
) {
// then, send email
$userData = [
'id' => 0,