Permalink
Browse files

Fix CS and phpdoc in Zend\Mvc

  • Loading branch information...
1 parent 887e899 commit 1772a49142aee1dfc7fd62652dfb8bf9eb4df0bf @prolic prolic committed Jun 25, 2012
Showing with 223 additions and 190 deletions.
  1. +7 −6 library/Zend/Mvc/Application.php
  2. +3 −0 library/Zend/Mvc/Controller/Plugin/AbstractPlugin.php
  3. +7 −7 library/Zend/Mvc/Controller/Plugin/FlashMessenger.php
  4. +15 −0 library/Zend/Mvc/Controller/Plugin/Forward.php
  5. +4 −4 library/Zend/Mvc/Controller/Plugin/Layout.php
  6. +1 −0 library/Zend/Mvc/Controller/Plugin/Params.php
  7. +5 −5 library/Zend/Mvc/Controller/Plugin/Redirect.php
  8. +5 −5 library/Zend/Mvc/Controller/Plugin/Url.php
  9. +2 −2 library/Zend/Mvc/Controller/PluginBroker.php
  10. +4 −4 library/Zend/Mvc/Controller/RestfulController.php
  11. +3 −4 library/Zend/Mvc/Exception/DomainException.php
  12. +2 −1 library/Zend/Mvc/Exception/ExceptionInterface.php
  13. +3 −4 library/Zend/Mvc/Exception/InvalidArgumentException.php
  14. +2 −1 library/Zend/Mvc/Exception/MissingLocatorException.php
  15. +2 −1 library/Zend/Mvc/Exception/RuntimeException.php
  16. +1 −1 library/Zend/Mvc/MvcEvent.php
  17. +2 −1 library/Zend/Mvc/Router/Exception/ExceptionInterface.php
  18. +3 −3 library/Zend/Mvc/Router/Exception/InvalidArgumentException.php
  19. +3 −4 library/Zend/Mvc/Router/Exception/RuntimeException.php
  20. +4 −4 library/Zend/Mvc/Router/Http/Hostname.php
  21. +6 −6 library/Zend/Mvc/Router/Http/Literal.php
  22. +4 −4 library/Zend/Mvc/Router/Http/Method.php
  23. +7 −7 library/Zend/Mvc/Router/Http/Part.php
  24. +6 −6 library/Zend/Mvc/Router/Http/Query.php
  25. +4 −4 library/Zend/Mvc/Router/Http/Regex.php
  26. +6 −6 library/Zend/Mvc/Router/Http/Scheme.php
  27. +8 −4 library/Zend/Mvc/Router/Http/Segment.php
  28. +12 −9 library/Zend/Mvc/Router/Http/TreeRouteStack.php
  29. +4 −4 library/Zend/Mvc/Router/Http/Wildcard.php
  30. +2 −2 library/Zend/Mvc/Router/PriorityList.php
  31. +6 −4 library/Zend/Mvc/Router/RouteBroker.php
  32. +8 −5 library/Zend/Mvc/Router/SimpleRouteStack.php
  33. +1 −1 library/Zend/Mvc/Service/ViewFeedRendererFactory.php
  34. +1 −1 library/Zend/Mvc/Service/ViewJsonRendererFactory.php
  35. +5 −5 library/Zend/Mvc/View/CreateViewModelListener.php
  36. +6 −6 library/Zend/Mvc/View/DefaultRenderingStrategy.php
  37. +7 −7 library/Zend/Mvc/View/ExceptionStrategy.php
  38. +6 −6 library/Zend/Mvc/View/InjectTemplateListener.php
  39. +5 −5 library/Zend/Mvc/View/InjectViewModelListener.php
  40. +7 −7 library/Zend/Mvc/View/RouteNotFoundStrategy.php
  41. +2 −2 tests/Zend/Mvc/Controller/Plugin/FlashMessengerTest.php
  42. +3 −3 tests/Zend/Mvc/Controller/TestAsset/UneventfulController.php
  43. +5 −5 tests/Zend/Mvc/Controller/TestAsset/UnlocatableEventfulController.php
  44. +3 −3 tests/Zend/Mvc/Router/Http/TestAsset/DummyRoute.php
  45. +3 −3 tests/Zend/Mvc/Router/Http/TestAsset/DummyRouteWithParam.php
  46. +3 −3 tests/Zend/Mvc/Router/TestAsset/DummyRoute.php
  47. +3 −3 tests/Zend/Mvc/Router/TestAsset/DummyRouteWithParam.php
  48. +2 −2 tests/Zend/Mvc/TestAsset/Locator.php
  49. +3 −3 tests/Zend/Mvc/TestAsset/LocatorAwareController.php
  50. +3 −3 tests/Zend/Mvc/TestAsset/PathController.php
  51. +4 −4 tests/Zend/Mvc/View/TestAsset/DumbStrategy.php
@@ -22,6 +22,7 @@
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\EventManagerAwareInterface;
+use Zend\ModuleManager\ModuleManagerInterface;
use Zend\Mvc\MvcEvent;
use Zend\ServiceManager\ServiceManager;
use Zend\Stdlib\RequestInterface;
@@ -83,7 +84,7 @@ class Application implements
protected $event;
/**
- * @var EventManager
+ * @var EventManagerInterface
*/
protected $events;
@@ -103,7 +104,7 @@ class Application implements
protected $serviceManager = null;
/**
- * @var \Zend\ModuleManager\ModuleManager
+ * @var ModuleManagerInterface
*/
protected $moduleManager;
@@ -179,7 +180,7 @@ public function getServiceManager()
/**
* Get the request object
*
- * @return Request
+ * @return RequestInterface
*/
public function getRequest()
{
@@ -189,7 +190,7 @@ public function getRequest()
/**
* Get the response object
*
- * @return Response
+ * @return ResponseInterface
*/
public function getResponse()
{
@@ -249,7 +250,7 @@ public function events()
* discovered controller, and controller class (if known).
* Typically, a handler should return a populated Response object
* that can be returned immediately.
- * @return SendableResponse
+ * @return ResponseInterface
*/
public function run()
{
@@ -309,7 +310,7 @@ public function run()
* event object.
*
* @param MvcEvent $event
- * @return Response
+ * @return ResponseInterface
*/
protected function completeRequest(MvcEvent $event)
{
@@ -32,6 +32,9 @@
*/
abstract class AbstractPlugin
{
+ /**
+ * @var null|Dispatchable
+ */
protected $controller;
/**
@@ -21,13 +21,13 @@
namespace Zend\Mvc\Controller\Plugin;
-use ArrayIterator,
- Countable,
- IteratorAggregate,
- Zend\Session\Container,
- Zend\Session\ManagerInterface as Manager,
- Zend\Session\SessionManager,
- Zend\Stdlib\SplQueue;
+use ArrayIterator;
+use Countable;
+use IteratorAggregate;
+use Zend\Session\Container;
+use Zend\Session\ManagerInterface as Manager;
+use Zend\Session\SessionManager;
+use Zend\Stdlib\SplQueue;
/**
* Flash Messenger - implement session-based messages
@@ -38,9 +38,24 @@
*/
class Forward extends AbstractPlugin
{
+ /**
+ * @var MvcEvent
+ */
protected $event;
+
+ /**
+ * @var ServiceLocatorInterface
+ */
protected $locator;
+
+ /**
+ * @var int
+ */
protected $maxNestedForwards = 10;
+
+ /**
+ * @var int
+ */
protected $numNestedForwards = 0;
/**
@@ -21,10 +21,10 @@
namespace Zend\Mvc\Controller\Plugin;
-use Zend\Mvc\InjectApplicationEventInterface,
- Zend\Mvc\Exception,
- Zend\Mvc\MvcEvent,
- Zend\View\Model\ModelInterface as Model;
+use Zend\Mvc\InjectApplicationEventInterface;
+use Zend\Mvc\Exception;
+use Zend\Mvc\MvcEvent;
+use Zend\View\Model\ModelInterface as Model;
/**
* @category Zend
@@ -52,6 +52,7 @@ public function __invoke($param, $default = null)
* @param string $param
* @param mixed $default
* @return mixed
+ * @throws RuntimeException
*/
public function fromRoute($param, $default = null)
{
@@ -21,11 +21,11 @@
namespace Zend\Mvc\Controller\Plugin;
-use Zend\Http\Response,
- Zend\Mvc\InjectApplicationEventInterface,
- Zend\Mvc\Exception,
- Zend\Mvc\MvcEvent,
- Zend\Mvc\Router\RouteStackInterface;
+use Zend\Http\Response;
+use Zend\Mvc\InjectApplicationEventInterface;
+use Zend\Mvc\Exception;
+use Zend\Mvc\MvcEvent;
+use Zend\Mvc\Router\RouteStackInterface;
/**
* @todo allow specifying status code as a default, or as an option to methods
@@ -21,11 +21,11 @@
namespace Zend\Mvc\Controller\Plugin;
-use Zend\Mvc\InjectApplicationEventInterface,
- Zend\Mvc\Exception,
- Zend\Mvc\MvcEvent,
- Zend\Mvc\Router\RouteStackInterface,
- Zend\EventManager\EventInterface;
+use Zend\Mvc\InjectApplicationEventInterface;
+use Zend\Mvc\Exception;
+use Zend\Mvc\MvcEvent;
+use Zend\Mvc\Router\RouteStackInterface;
+use Zend\EventManager\EventInterface;
/**
* @category Zend
@@ -21,8 +21,8 @@
namespace Zend\Mvc\Controller;
-use Zend\Loader\PluginBroker as PluginBrokerBase,
- Zend\Stdlib\DispatchableInterface as Dispatchable;
+use Zend\Loader\PluginBroker as PluginBrokerBase;
+use Zend\Stdlib\DispatchableInterface as Dispatchable;
/**
* @category Zend
@@ -80,7 +80,7 @@
protected $events;
/**
- * @var Locator
+ * @var ServiceLocatorInterface
*/
protected $locator;
@@ -257,7 +257,7 @@ public function execute(MvcEvent $e)
public function getRequest()
{
if (!$this->request) {
- $this->setRequest(new HttpRequest());
+ $this->request = new HttpRequest();
}
return $this->request;
}
@@ -270,7 +270,7 @@ public function getRequest()
public function getResponse()
{
if (!$this->response) {
- $this->setResponse(new HttpResponse());
+ $this->response = new HttpResponse();
}
return $this->response;
}
@@ -332,7 +332,7 @@ public function setEvent(Event $e)
*
* Will create a new MvcEvent if none provided.
*
- * @return Event
+ * @return MvcEvent
*/
public function getEvent()
{
@@ -2,7 +2,6 @@
namespace Zend\Mvc\Exception;
-class DomainException
- extends \DomainException
- implements ExceptionInterface
-{}
+class DomainException extends \DomainException implements ExceptionInterface
+{
+}
@@ -3,4 +3,5 @@
namespace Zend\Mvc\Exception;
interface ExceptionInterface
-{}
+{
+}
@@ -2,7 +2,6 @@
namespace Zend\Mvc\Exception;
-class InvalidArgumentException
- extends \InvalidArgumentException
- implements ExceptionInterface
-{}
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
@@ -29,4 +29,5 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class MissingLocatorException extends RuntimeException
-{}
+{
+}
@@ -29,4 +29,5 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException extends \RuntimeException implements ExceptionInterface
-{}
+{
+}
@@ -81,7 +81,7 @@ class MvcEvent extends Event
* Set application instance
*
* @param ApplicationInterface $application
- * @return Mvc
+ * @return MvcEvent
*/
public function setApplication(ApplicationInterface $application)
{
@@ -28,4 +28,5 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface extends Exception
-{}
+{
+}
@@ -29,6 +29,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-class InvalidArgumentException extends Exception\InvalidArgumentException implements
- ExceptionInterface
-{}
+class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface
+{
+}
@@ -29,7 +29,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-class RuntimeException
- extends Exception\RuntimeException
- implements ExceptionInterface
-{}
+class RuntimeException extends Exception\RuntimeException implements ExceptionInterface
+{
+}
@@ -21,10 +21,10 @@
namespace Zend\Mvc\Router\Http;
-use Traversable,
- Zend\Stdlib\ArrayUtils,
- Zend\Stdlib\RequestInterface as Request,
- Zend\Mvc\Router\Exception;
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Stdlib\RequestInterface as Request;
+use Zend\Mvc\Router\Exception;
/**
* Hostname route.
@@ -21,10 +21,10 @@
namespace Zend\Mvc\Router\Http;
-use Traversable,
- Zend\Stdlib\ArrayUtils,
- Zend\Stdlib\RequestInterface as Request,
- Zend\Mvc\Router\Exception;
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Stdlib\RequestInterface as Request;
+use Zend\Mvc\Router\Exception;
/**
* Literal route.
@@ -67,8 +67,8 @@ public function __construct($route, array $defaults = array())
* factory(): defined by RouteInterface interface.
*
* @see Route::factory()
- * @param array|\Traversable $options
- * @throws \Zend\Mvc\Router\Exception\InvalidArgumentException
+ * @param array|Traversable $options
+ * @throws Exception\InvalidArgumentException
* @return Literal
*/
public static function factory($options = array())
@@ -21,10 +21,10 @@
namespace Zend\Mvc\Router\Http;
-use Traversable,
- Zend\Stdlib\ArrayUtils,
- Zend\Stdlib\RequestInterface as Request,
- Zend\Mvc\Router\Exception;
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Stdlib\RequestInterface as Request;
+use Zend\Mvc\Router\Exception;
/**
* Method route.
@@ -21,12 +21,12 @@
namespace Zend\Mvc\Router\Http;
-use Traversable,
- Zend\Stdlib\ArrayUtils,
- Zend\Stdlib\RequestInterface as Request,
- Zend\Mvc\Router\RouteBroker,
- Zend\Mvc\Router\Exception,
- Zend\Mvc\Router\PriorityList;
+use Traversable;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Stdlib\RequestInterface as Request;
+use Zend\Mvc\Router\RouteBroker;
+use Zend\Mvc\Router\Exception;
+use Zend\Mvc\Router\PriorityList;
/**
* RouteInterface part.
@@ -92,7 +92,7 @@ public function __construct($route, $mayTerminate, RouteBroker $routeBroker, arr
*
* @see Route::factory()
* @param mixed $options
- * @throws \Zend\Mvc\Router\Exception\InvalidArgumentException
+ * @throws Exception\InvalidArgumentException
* @return Part
*/
public static function factory($options = array())
Oops, something went wrong.

0 comments on commit 1772a49

Please sign in to comment.