Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 069aff2

Browse files
committed
Merge branch 'improvement/291'
Close #291
2 parents 9f092ff + a61af6b commit 069aff2

23 files changed

+14
-28
lines changed

src/Controller/ControllerManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ControllerManager extends AbstractPluginManager
4242
* Injects an initializer for injecting controllers with an
4343
* event manager and plugin manager.
4444
*
45-
* @param ConfigInterface|ContainerInterface $container
45+
* @param ConfigInterface|ContainerInterface $configOrContainerInstance
4646
* @param array $config
4747
*/
4848
public function __construct($configOrContainerInstance, array $config = [])

src/Controller/LazyControllerAbstractFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function canCreate(ContainerInterface $container, $requestedName)
146146
private function resolveParameter(ContainerInterface $container, $requestedName)
147147
{
148148
/**
149-
* @param ReflectionClass $parameter
149+
* @param ReflectionParameter $parameter
150150
* @return mixed
151151
* @throws ServiceNotFoundException If type-hinted parameter cannot be
152152
* resolved to a service in the container.

src/Controller/PluginManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class PluginManager extends AbstractPluginManager
8787
* as the first controller, the reference to the controller inside the
8888
* plugin is lost.
8989
*
90-
* @param string $name
90+
* @param string $name
91+
* @param null|array $options Options to use when creating the instance.
9192
* @return DispatchableInterface
9293
*/
9394
public function get($name, array $options = null)

src/DispatchListener.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public function onDispatch(MvcEvent $e)
8383
? $routeMatch->getParam('controller', 'not-found')
8484
: 'not-found';
8585
$application = $e->getApplication();
86-
$events = $application->getEventManager();
8786
$controllerManager = $this->controllerManager;
8887

8988

src/MiddlewareListener.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@
1111
use Interop\Http\ServerMiddleware\MiddlewareInterface;
1212
use Psr\Http\Message\ResponseInterface as PsrResponseInterface;
1313
use Psr\Http\Message\ResponseInterface;
14-
use Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
1514
use Zend\EventManager\AbstractListenerAggregate;
1615
use Zend\EventManager\EventManagerInterface;
1716
use Zend\Mvc\Exception\InvalidMiddlewareException;
18-
use Zend\Mvc\Exception\ReachedFinalHandlerException;
1917
use Zend\Mvc\Controller\MiddlewareController;
2018
use Zend\Psr7Bridge\Psr7Response;
21-
use Zend\Router\RouteMatch;
2219
use Zend\Stratigility\Delegate\CallableDelegateDecorator;
2320
use Zend\Stratigility\MiddlewarePipe;
2421

@@ -28,6 +25,7 @@ class MiddlewareListener extends AbstractListenerAggregate
2825
* Attach listeners to an event manager
2926
*
3027
* @param EventManagerInterface $events
28+
* @param int $priority
3129
* @return void
3230
*/
3331
public function attach(EventManagerInterface $events, $priority = 1)

src/Service/ControllerManagerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ControllerManagerFactory implements FactoryInterface
2424
* if the controller implements a setPluginManager() method.
2525
*
2626
* @param ContainerInterface $container
27-
* @param string $Name
27+
* @param string $name
2828
* @param null|array $options
2929
* @return ControllerManager
3030
*/

src/Service/ServiceListenerFactory.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
1515
use Zend\ServiceManager\Factory\FactoryInterface;
1616
use Zend\ServiceManager\Factory\InvokableFactory;
17-
use Zend\ServiceManager\ServiceLocatorInterface;
1817

1918
class ServiceListenerFactory implements FactoryInterface
2019
{
@@ -112,7 +111,9 @@ class ServiceListenerFactory implements FactoryInterface
112111
* - interface: the name of the interface that modules can implement as string
113112
* - method: the name of the method that modules have to implement as string
114113
*
115-
* @param ServiceLocatorInterface $serviceLocator
114+
* @param ContainerInterface $container
115+
* @param string $requestedName
116+
* @param null|array $options
116117
* @return ServiceListenerInterface
117118
* @throws ServiceNotCreatedException for invalid ServiceListener service
118119
* @throws ServiceNotCreatedException For invalid configurations.

src/Service/ViewHelperManagerFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class ViewHelperManagerFactory extends AbstractPluginManagerFactory
3131
* Create and return the view helper manager
3232
*
3333
* @param ContainerInterface $container
34+
* @param string $requestedName
35+
* @param null|array $options
3436
* @return HelperPluginManager
3537
* @throws ServiceNotCreatedException
3638
*/

src/View/Http/DefaultRenderingStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getLayoutTemplate()
7676
*
7777
* @param MvcEvent $e
7878
* @return Response|null
79-
* @throws \Exception
79+
* @throws \Exception|\Throwable
8080
*/
8181
public function render(MvcEvent $e)
8282
{

test/Application/BadControllerTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use ReflectionProperty;
1111
use Zend\Http\PhpEnvironment\Request;
1212
use Zend\Http\PhpEnvironment\Response;
13-
use Zend\Mvc\Application;
1413
use Zend\Mvc\Controller\ControllerManager;
1514
use Zend\Mvc\Service\ServiceManagerConfig;
1615
use Zend\Mvc\Service\ServiceListenerFactory;

0 commit comments

Comments
 (0)