From ba509724e6e50e7325b2de6d193bb6c7d434cf0c Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 20 Feb 2014 14:00:20 +0000 Subject: [PATCH] Minor fixes --- src/Whoops/Exception/Inspector.php | 2 +- src/Whoops/Handler/HandlerInterface.php | 3 +++ src/Whoops/Handler/PrettyPageHandler.php | 4 ++-- src/Whoops/Provider/Zend/ExceptionStrategy.php | 1 - src/Whoops/Provider/Zend/RouteNotFoundStrategy.php | 1 - src/Whoops/Run.php | 8 ++++---- src/Whoops/Util/TemplateHelper.php | 2 +- tests/Whoops/Handler/SoapResponseHandlerTest.php | 2 +- tests/Whoops/Handler/XmlResponseHandlerTest.php | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Whoops/Exception/Inspector.php b/src/Whoops/Exception/Inspector.php index 9e063ef..427f7ff 100644 --- a/src/Whoops/Exception/Inspector.php +++ b/src/Whoops/Exception/Inspector.php @@ -68,7 +68,7 @@ class Inspector /** * Returns an Inspector for a previous Exception, if any. * @todo Clean this up a bit, cache stuff a bit better. - * @return \Whoops\Exception\Inspector|null + * @return Inspector */ public function getPreviousExceptionInspector() { diff --git a/src/Whoops/Handler/HandlerInterface.php b/src/Whoops/Handler/HandlerInterface.php index abb4078..abf3350 100644 --- a/src/Whoops/Handler/HandlerInterface.php +++ b/src/Whoops/Handler/HandlerInterface.php @@ -18,16 +18,19 @@ interface HandlerInterface /** * @param Run $run + * @return void */ public function setRun(Run $run); /** * @param Exception $exception + * @return void */ public function setException(Exception $exception); /** * @param Inspector $inspector + * @return void */ public function setInspector(Inspector $inspector); } diff --git a/src/Whoops/Handler/PrettyPageHandler.php b/src/Whoops/Handler/PrettyPageHandler.php index f158b2b..7c420e4 100644 --- a/src/Whoops/Handler/PrettyPageHandler.php +++ b/src/Whoops/Handler/PrettyPageHandler.php @@ -33,7 +33,7 @@ class PrettyPageHandler extends Handler private $extraTables = array(); /** - * @var boolean + * @var bool */ private $handleUnconditionally = false; @@ -294,7 +294,7 @@ class PrettyPageHandler extends Handler * @throws InvalidArgumentException If editor resolver does not return a string * @param string $filePath * @param int $line - * @return string|bool + * @return false|string */ public function getEditorHref($filePath, $line) { diff --git a/src/Whoops/Provider/Zend/ExceptionStrategy.php b/src/Whoops/Provider/Zend/ExceptionStrategy.php index ed8d471..d840366 100644 --- a/src/Whoops/Provider/Zend/ExceptionStrategy.php +++ b/src/Whoops/Provider/Zend/ExceptionStrategy.php @@ -7,7 +7,6 @@ namespace Whoops\Provider\Zend; use Whoops\Run; - use Zend\Mvc\View\Http\ExceptionStrategy as BaseExceptionStrategy; use Zend\Mvc\MvcEvent; use Zend\Mvc\Application; diff --git a/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php b/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php index 935f862..c4ab3e0 100644 --- a/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php +++ b/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php @@ -7,7 +7,6 @@ namespace Whoops\Provider\Zend; use Whoops\Run; - use Zend\Mvc\View\Http\RouteNotFoundStrategy as BaseRouteNotFoundStrategy; use Zend\Mvc\MvcEvent; use Zend\Stdlib\ResponseInterface as Response; diff --git a/src/Whoops/Run.php b/src/Whoops/Run.php index b5ec006..fe484b3 100644 --- a/src/Whoops/Run.php +++ b/src/Whoops/Run.php @@ -152,7 +152,7 @@ class Run /** * Silence particular errors in particular files * @param array|string $patterns List or a single regex pattern to match - * @param integer $levels Defaults to E_STRICT | E_DEPRECATED + * @param int $levels Defaults to E_STRICT | E_DEPRECATED * @return \Whoops\Run */ public function silenceErrorsInPaths($patterns, $levels = 10240) @@ -178,7 +178,7 @@ class Run * use 502, 503, or another 5xx family code. * * @param bool|int $code - * @return bool + * @return int|false */ public function sendHttpCode($code = null) { @@ -313,7 +313,7 @@ class Run * @param string $file * @param int $line * - * @return bool + * @return bool|null */ public function handleError($level, $message, $file = null, $line = null) { @@ -361,7 +361,7 @@ class Run /** * In certain scenarios, like in shutdown handler, we can not throw exceptions - * @var boolean + * @var bool */ private $canThrowExceptions = true; diff --git a/src/Whoops/Util/TemplateHelper.php b/src/Whoops/Util/TemplateHelper.php index fb189fe..6b09d03 100644 --- a/src/Whoops/Util/TemplateHelper.php +++ b/src/Whoops/Util/TemplateHelper.php @@ -62,7 +62,7 @@ class TemplateHelper * method also accepts an array of additional variables to be * passed to the template. * - * @param string $__template + * @param string $template * @param array $additionalVariables */ public function render($template, array $additionalVariables = null) diff --git a/tests/Whoops/Handler/SoapResponseHandlerTest.php b/tests/Whoops/Handler/SoapResponseHandlerTest.php index 45dfba0..9264d7a 100644 --- a/tests/Whoops/Handler/SoapResponseHandlerTest.php +++ b/tests/Whoops/Handler/SoapResponseHandlerTest.php @@ -62,7 +62,7 @@ class SoapResponseHandlerTest extends TestCase /** * See if passed string is a valid XML document * @param string $data - * @return boolean + * @return bool */ private function isValidXml($data) { diff --git a/tests/Whoops/Handler/XmlResponseHandlerTest.php b/tests/Whoops/Handler/XmlResponseHandlerTest.php index 91dec35..8fc5cdc 100644 --- a/tests/Whoops/Handler/XmlResponseHandlerTest.php +++ b/tests/Whoops/Handler/XmlResponseHandlerTest.php @@ -70,7 +70,7 @@ class XmlResponseHandlerTest extends TestCase /** * See if passed string is a valid XML document * @param string $data - * @return boolean + * @return bool */ private function isValidXml($data) {