Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Controller/ControllerManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ControllerManager extends AbstractPluginManager
* Injects an initializer for injecting controllers with an
* event manager and plugin manager.
*
* @param ConfigInterface|ContainerInterface $container
* @param ConfigInterface|ContainerInterface $configOrContainerInstance
* @param array $config
*/
public function __construct($configOrContainerInstance, array $config = [])
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/LazyControllerAbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function canCreate(ContainerInterface $container, $requestedName)
private function resolveParameter(ContainerInterface $container, $requestedName)
{
/**
* @param ReflectionClass $parameter
* @param ReflectionParameter $parameter
* @return mixed
* @throws ServiceNotFoundException If type-hinted parameter cannot be
* resolved to a service in the container.
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class PluginManager extends AbstractPluginManager
* as the first controller, the reference to the controller inside the
* plugin is lost.
*
* @param string $name
* @param string $name
* @param null|array $options Options to use when creating the instance.
* @return DispatchableInterface
*/
public function get($name, array $options = null)
Expand Down
1 change: 0 additions & 1 deletion src/DispatchListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public function onDispatch(MvcEvent $e)
? $routeMatch->getParam('controller', 'not-found')
: 'not-found';
$application = $e->getApplication();
$events = $application->getEventManager();
$controllerManager = $this->controllerManager;


Expand Down
4 changes: 1 addition & 3 deletions src/MiddlewareListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@
use Interop\Http\ServerMiddleware\MiddlewareInterface;
use Psr\Http\Message\ResponseInterface as PsrResponseInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface;
use Zend\EventManager\AbstractListenerAggregate;
use Zend\EventManager\EventManagerInterface;
use Zend\Mvc\Exception\InvalidMiddlewareException;
use Zend\Mvc\Exception\ReachedFinalHandlerException;
use Zend\Mvc\Controller\MiddlewareController;
use Zend\Psr7Bridge\Psr7Response;
use Zend\Router\RouteMatch;
use Zend\Stratigility\Delegate\CallableDelegateDecorator;
use Zend\Stratigility\MiddlewarePipe;

Expand All @@ -28,6 +25,7 @@ class MiddlewareListener extends AbstractListenerAggregate
* Attach listeners to an event manager
*
* @param EventManagerInterface $events
* @param int $priority
* @return void
*/
public function attach(EventManagerInterface $events, $priority = 1)
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ControllerManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ControllerManagerFactory implements FactoryInterface
* if the controller implements a setPluginManager() method.
*
* @param ContainerInterface $container
* @param string $Name
* @param string $name
* @param null|array $options
* @return ControllerManager
*/
Expand Down
5 changes: 3 additions & 2 deletions src/Service/ServiceListenerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
use Zend\ServiceManager\Factory\FactoryInterface;
use Zend\ServiceManager\Factory\InvokableFactory;
use Zend\ServiceManager\ServiceLocatorInterface;

class ServiceListenerFactory implements FactoryInterface
{
Expand Down Expand Up @@ -112,7 +111,9 @@ class ServiceListenerFactory implements FactoryInterface
* - interface: the name of the interface that modules can implement as string
* - method: the name of the method that modules have to implement as string
*
* @param ServiceLocatorInterface $serviceLocator
* @param ContainerInterface $container
* @param string $requestedName
* @param null|array $options
* @return ServiceListenerInterface
* @throws ServiceNotCreatedException for invalid ServiceListener service
* @throws ServiceNotCreatedException For invalid configurations.
Expand Down
2 changes: 2 additions & 0 deletions src/Service/ViewHelperManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class ViewHelperManagerFactory extends AbstractPluginManagerFactory
* Create and return the view helper manager
*
* @param ContainerInterface $container
* @param string $requestedName
* @param null|array $options
* @return HelperPluginManager
* @throws ServiceNotCreatedException
*/
Expand Down
2 changes: 1 addition & 1 deletion src/View/Http/DefaultRenderingStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getLayoutTemplate()
*
* @param MvcEvent $e
* @return Response|null
* @throws \Exception
* @throws \Exception|\Throwable
*/
public function render(MvcEvent $e)
{
Expand Down
1 change: 0 additions & 1 deletion test/Application/BadControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use ReflectionProperty;
use Zend\Http\PhpEnvironment\Request;
use Zend\Http\PhpEnvironment\Response;
use Zend\Mvc\Application;
use Zend\Mvc\Controller\ControllerManager;
use Zend\Mvc\Service\ServiceManagerConfig;
use Zend\Mvc\Service\ServiceListenerFactory;
Expand Down
1 change: 0 additions & 1 deletion test/Application/InvalidControllerTypeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use stdClass;
use Zend\Http\PhpEnvironment\Request;
use Zend\Http\PhpEnvironment\Response;
use Zend\Mvc\Application;
use Zend\Mvc\Controller\ControllerManager;
use Zend\Mvc\Service\ServiceManagerConfig;
use Zend\Mvc\Service\ServiceListenerFactory;
Expand Down
1 change: 0 additions & 1 deletion test/Application/MissingControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use ReflectionProperty;
use Zend\Http\PhpEnvironment\Request;
use Zend\Http\PhpEnvironment\Response;
use Zend\Mvc\Application;
use Zend\Mvc\Service\ServiceManagerConfig;
use Zend\Mvc\Service\ServiceListenerFactory;
use Zend\Router;
Expand Down
1 change: 0 additions & 1 deletion test/Application/PathControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use ReflectionProperty;
use Zend\Http\PhpEnvironment\Request;
use Zend\Http\PhpEnvironment\Response;
use Zend\Mvc\Application;
use Zend\Mvc\Controller\ControllerManager;
use Zend\Mvc\Service\ServiceManagerConfig;
use Zend\Mvc\Service\ServiceListenerFactory;
Expand Down
1 change: 1 addition & 0 deletions test/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public function testEventsAreEmptyAtFirst()
* @param string $listenerServiceName
* @param string $event
* @param string $method
* @param bool $isCustom
*
* @dataProvider bootstrapRegistersListenersProvider
*/
Expand Down
3 changes: 1 addition & 2 deletions test/Controller/ActionControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace ZendTest\Mvc\Controller;

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use Zend\EventManager\EventManager;
use Zend\EventManager\SharedEventManager;
use Zend\EventManager\SharedEventManagerInterface;
Expand Down Expand Up @@ -49,7 +48,7 @@ public function setUp()
}

/**
* @param SharedEventManager
* @param SharedEventManagerInterface $sharedManager
* @return EventManager
*/
protected function createEventManager(SharedEventManagerInterface $sharedManager)
Expand Down
1 change: 0 additions & 1 deletion test/Controller/ControllerManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace ZendTest\Mvc\Controller;

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use Zend\EventManager\EventManager;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\SharedEventManager;
Expand Down
1 change: 0 additions & 1 deletion test/Controller/Plugin/AcceptableViewModelSelectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use PHPUnit\Framework\TestCase;
use Zend\Http\Header\Accept\FieldValuePart\AcceptFieldValuePart;
use Zend\Mvc\Controller\Plugin\AcceptableViewModelSelector;
use Zend\Http\Request;
use Zend\Mvc\Exception\InvalidArgumentException;
use Zend\Mvc\MvcEvent;
Expand Down
2 changes: 0 additions & 2 deletions test/Controller/Plugin/ForwardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace ZendTest\Mvc\Controller\Plugin;

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use stdClass;
use Zend\EventManager\EventManager;
use Zend\EventManager\SharedEventManager;
Expand All @@ -21,7 +20,6 @@
use Zend\Mvc\Controller\Plugin\Forward as ForwardPlugin;
use Zend\Mvc\Controller\PluginManager;
use Zend\Mvc\Exception\DomainException;
use Zend\Mvc\Exception\InvalidControllerException;
use Zend\Mvc\MvcEvent;
use Zend\Router\RouteMatch;
use Zend\ServiceManager\Config;
Expand Down
1 change: 0 additions & 1 deletion test/Controller/RestfulControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace ZendTest\Mvc\Controller;

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionObject;
use stdClass;
use Zend\EventManager\EventManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use Interop\Container\ContainerInterface;
use Zend\ServiceManager\Factory\AbstractFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use ZendTest\Mvc\TestAsset\PathController;

class ControllerLoaderAbstractFactory implements AbstractFactoryInterface
Expand Down
2 changes: 0 additions & 2 deletions test/Service/ServiceListenerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
namespace ZendTest\Mvc\Service;

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionProperty;
use Zend\Mvc\Service\ServiceListenerFactory;
use Zend\ServiceManager\ServiceManager;

Expand Down
2 changes: 0 additions & 2 deletions test/Service/ServiceManagerConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
namespace ZendTest\Mvc\Service;

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use stdClass;
use Zend\EventManager\EventManager;
use Zend\EventManager\EventManagerAwareInterface;
use Zend\EventManager\SharedEventManagerInterface;
use Zend\Mvc\Controller\PluginManager;
use Zend\Mvc\Service\ServiceManagerConfig;
use Zend\ServiceManager\Factory\InvokableFactory;
use Zend\ServiceManager\ServiceManager;
Expand Down
1 change: 0 additions & 1 deletion test/View/DefaultRendereringStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace ZendTest\Mvc\View;

use PHPUnit\Framework\TestCase;
use Zend\EventManager\Event;
use Zend\EventManager\EventManager;
use Zend\EventManager\SharedEventManager;
use Zend\EventManager\Test\EventListenerIntrospectionTrait;
Expand Down