From 87d8738074752c393ede9bc9c15d2452969c6e67 Mon Sep 17 00:00:00 2001 From: Patrick Rodacker Date: Tue, 17 Sep 2019 22:39:11 +0200 Subject: [PATCH] update description for handler signature in phpdocs for setDefaultErrorHandler and setErrorHandler methods --- Slim/Middleware/ErrorMiddleware.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Slim/Middleware/ErrorMiddleware.php b/Slim/Middleware/ErrorMiddleware.php index 66ea19397..194c57ce4 100644 --- a/Slim/Middleware/ErrorMiddleware.php +++ b/Slim/Middleware/ErrorMiddleware.php @@ -142,13 +142,15 @@ public function getDefaultErrorHandler() /** * Set callable as the default Slim application error handler. * - * This service MUST return a callable that accepts - * three arguments optionally four arguments. + * The callable signature MUST match the ErrorHandlerInterface + * + * @see \Slim\Interfaces\ErrorHandlerInterface * * 1. Instance of \Psr\Http\Message\ServerRequestInterface - * 2. Instance of \Psr\Http\Message\ResponseInterface - * 3. Instance of \Exception - * 4. Boolean displayErrorDetails (optional) + * 2. Instance of \Throwable + * 3. Boolean displayErrorDetails + * 4. Boolean $logErrors + * 5. Boolean $logErrorDetails * * The callable MUST return an instance of * \Psr\Http\Message\ResponseInterface. @@ -166,13 +168,15 @@ public function setDefaultErrorHandler($handler): self * Set callable to handle scenarios where an error * occurs when processing the current request. * - * This service MUST return a callable that accepts - * three arguments optionally four arguments. + * The callable signature MUST match the ErrorHandlerInterface + * + * @see \Slim\Interfaces\ErrorHandlerInterface * * 1. Instance of \Psr\Http\Message\ServerRequestInterface - * 2. Instance of \Psr\Http\Message\ResponseInterface - * 3. Instance of \Exception - * 4. Boolean displayErrorDetails (optional) + * 2. Instance of \Throwable + * 3. Boolean displayErrorDetails + * 4. Boolean $logErrors + * 5. Boolean $logErrorDetails * * The callable MUST return an instance of * \Psr\Http\Message\ResponseInterface.