diff options
author | Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com> | 2016-10-27 22:37:24 +0000 |
---|---|---|
committer | Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com> | 2016-10-27 22:37:24 +0000 |
commit | a874d48b8571d67bd372d6ea71da9857caf94760 (patch) | |
tree | e76020f842c9ef66a12460772116a281badd05a7 | |
parent | 8bf861bf03eb6ea98d0af861a835e6cb29406078 (diff) | |
download | error-handler-a874d48b8571d67bd372d6ea71da9857caf94760.zip error-handler-a874d48b8571d67bd372d6ea71da9857caf94760.tar.gz error-handler-a874d48b8571d67bd372d6ea71da9857caf94760.tar.bz2 |
Scrutinizer Auto-Fixesorigin/scrutinizer-patch-1
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
-rw-r--r-- | src/ErrorHandler.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ErrorHandler.php b/src/ErrorHandler.php index 799c45e..0737322 100644 --- a/src/ErrorHandler.php +++ b/src/ErrorHandler.php @@ -4,7 +4,6 @@ namespace Jasny; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; - use Psr\Log\LoggerInterface; use Psr\Log\LoggerAwareInterface; use Psr\Log\LogLevel; @@ -192,9 +191,9 @@ class ErrorHandler implements LoggerAwareInterface try { $this->error = null; $nextResponse = $next($request, $response); - } catch(\Error $e) { + } catch (\Error $e) { $this->error = $e; - } catch(\Exception $e) { + } catch (\Exception $e) { $this->error = $e; } @@ -241,7 +240,7 @@ class ErrorHandler implements LoggerAwareInterface $this->logErrorTypes |= $errorTypes; $nonFatal = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED; - $unhandled = E_ERROR|E_PARSE|E_CORE_ERROR|E_COMPILE_ERROR; + $unhandled = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR; if ($this->logErrorTypes & $nonFatal) { $this->initErrorHandler(); @@ -264,7 +263,7 @@ class ErrorHandler implements LoggerAwareInterface if (!$clearOutput) { $this->onFatalError = $callback; } else { - $this->onFatalError = function($error) use ($callback) { + $this->onFatalError = function ($error) use ($callback) { $this->clearOutputBuffer(); $callback($error); }; @@ -340,7 +339,7 @@ class ErrorHandler implements LoggerAwareInterface $this->reservedMemory = null; $err = $this->errorGetLast(); - $unhandled = E_ERROR|E_PARSE|E_CORE_ERROR|E_COMPILE_ERROR; + $unhandled = E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR; if (!$err || !($err['type'] & $unhandled)) { return; |