diff --git a/src/Whoops/Exception/FrameCollection.php b/src/Whoops/Exception/FrameCollection.php index c5fb7bc..5708712 100644 --- a/src/Whoops/Exception/FrameCollection.php +++ b/src/Whoops/Exception/FrameCollection.php @@ -37,7 +37,7 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable * Filters frames using a callable, returns the same FrameCollection * * @param callable $callable - * @return Whoops\Exception\FrameCollection + * @return FrameCollection */ public function filter($callable) { @@ -49,7 +49,7 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable * Map the collection of frames * * @param callable $callable - * @return Whoops\Exception\FrameCollection + * @return FrameCollection */ public function map($callable) { @@ -76,7 +76,7 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable * * @todo If this gets any more complex than this, * have getIterator use this method. - * @see Whoops\Exception\FrameCollection::getIterator + * @see FrameCollection::getIterator * @return array */ public function getArray() diff --git a/src/Whoops/Exception/Inspector.php b/src/Whoops/Exception/Inspector.php index 7125c3f..2ecf757 100644 --- a/src/Whoops/Exception/Inspector.php +++ b/src/Whoops/Exception/Inspector.php @@ -17,7 +17,7 @@ class Inspector private $exception; /** - * @var Whoops\Exception\FrameCollection + * @var FrameCollection */ private $frames; @@ -56,7 +56,7 @@ class Inspector /** * Returns an iterator for the inspected exception's * frames. - * @return Whoops\Exception\FrameCollection + * @return FrameCollection */ public function getFrames() { diff --git a/src/Whoops/Handler/Handler.php b/src/Whoops/Handler/Handler.php index b8c968d..a6ca5c4 100644 --- a/src/Whoops/Handler/Handler.php +++ b/src/Whoops/Handler/Handler.php @@ -64,7 +64,7 @@ abstract class Handler implements HandlerInterface } /** - * @return Run + * @return Inspector */ protected function getInspector() { diff --git a/src/Whoops/Handler/JsonResponseHandler.php b/src/Whoops/Handler/JsonResponseHandler.php index 80952d2..a5e8d62 100644 --- a/src/Whoops/Handler/JsonResponseHandler.php +++ b/src/Whoops/Handler/JsonResponseHandler.php @@ -6,6 +6,7 @@ namespace Whoops\Handler; use Whoops\Handler\Handler; +use Whoops\Exception\Frame; /** * Catches an exception and converts it to a JSON @@ -89,6 +90,7 @@ class JsonResponseHandler extends Handler $frameData = array(); foreach($frames as $frame) { + /** @var Frame $frame */ $frameData[] = array( 'file' => $frame->getFile(), 'line' => $frame->getLine(), diff --git a/src/Whoops/Provider/Silex/WhoopsServiceProvider.php b/src/Whoops/Provider/Silex/WhoopsServiceProvider.php index 8ce04b7..0250448 100644 --- a/src/Whoops/Provider/Silex/WhoopsServiceProvider.php +++ b/src/Whoops/Provider/Silex/WhoopsServiceProvider.php @@ -9,6 +9,7 @@ use Whoops\Run; use Whoops\Handler\PrettyPageHandler; use Silex\ServiceProviderInterface; use Silex\Application; +use Symfony\Component\HttpFoundation\Request use RuntimeException; class WhoopsServiceProvider implements ServiceProviderInterface @@ -30,6 +31,7 @@ class WhoopsServiceProvider implements ServiceProviderInterface // instance, and working with it to add new data tables $app['whoops.silex_info_handler'] = $app->protect(function() use($app) { try { + /** @var Request $request */ $request = $app['request']; } catch (RuntimeException $e) { // This error occurred too early in the application's life @@ -37,8 +39,11 @@ class WhoopsServiceProvider implements ServiceProviderInterface return; } + /** @var PrettyPageHandler $errorPageHandler */ + $errorPageHandler = $app["whoops.error_page_handler"]; + // General application info: - $app['whoops.error_page_handler']->addDataTable('Silex Application', array( + $errorPageHandler->addDataTable('Silex Application', array( 'Charset' => $app['charset'], 'Locale' => $app['locale'], 'Route Class' => $app['route_class'], @@ -47,7 +52,7 @@ class WhoopsServiceProvider implements ServiceProviderInterface )); // Request info: - $app['whoops.error_page_handler']->addDataTable('Silex Application (Request)', array( + $errorPageHandler->addDataTable('Silex Application (Request)', array( 'URI' => $request->getUri(), 'Request URI' => $request->getRequestUri(), 'Path Info' => $request->getPathInfo(), diff --git a/src/Whoops/Resources/pretty-template.php b/src/Whoops/Resources/pretty-template.php index 8d16a01..e5ab982 100644 --- a/src/Whoops/Resources/pretty-template.php +++ b/src/Whoops/Resources/pretty-template.php @@ -27,6 +27,7 @@ clicking these links/buttons will display the code view for that particular frame */ ?> frames as $i => $frame): ?> +