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

Commit a61af6b

Browse files
committed
Merge pull request #291 from unckleg/cs-fixes-intellij
Intellij scan fixes (Unused/Uncompatible/Undocumented stuff)
2 parents 9f092ff + 4e90a42 commit a61af6b

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;

test/Application/InvalidControllerTypeTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use stdClass;
1212
use Zend\Http\PhpEnvironment\Request;
1313
use Zend\Http\PhpEnvironment\Response;
14-
use Zend\Mvc\Application;
1514
use Zend\Mvc\Controller\ControllerManager;
1615
use Zend\Mvc\Service\ServiceManagerConfig;
1716
use Zend\Mvc\Service\ServiceListenerFactory;

test/Application/MissingControllerTrait.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\Service\ServiceManagerConfig;
1514
use Zend\Mvc\Service\ServiceListenerFactory;
1615
use Zend\Router;

test/Application/PathControllerTrait.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;

test/ApplicationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public function testEventsAreEmptyAtFirst()
165165
* @param string $listenerServiceName
166166
* @param string $event
167167
* @param string $method
168+
* @param bool $isCustom
168169
*
169170
* @dataProvider bootstrapRegistersListenersProvider
170171
*/

test/Controller/ActionControllerTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace ZendTest\Mvc\Controller;
99

1010
use PHPUnit\Framework\TestCase;
11-
use ReflectionClass;
1211
use Zend\EventManager\EventManager;
1312
use Zend\EventManager\SharedEventManager;
1413
use Zend\EventManager\SharedEventManagerInterface;
@@ -49,7 +48,7 @@ public function setUp()
4948
}
5049

5150
/**
52-
* @param SharedEventManager
51+
* @param SharedEventManagerInterface $sharedManager
5352
* @return EventManager
5453
*/
5554
protected function createEventManager(SharedEventManagerInterface $sharedManager)

test/Controller/ControllerManagerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace ZendTest\Mvc\Controller;
99

1010
use PHPUnit\Framework\TestCase;
11-
use ReflectionClass;
1211
use Zend\EventManager\EventManager;
1312
use Zend\EventManager\EventManagerInterface;
1413
use Zend\EventManager\SharedEventManager;

test/Controller/Plugin/AcceptableViewModelSelectorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
use PHPUnit\Framework\TestCase;
1111
use Zend\Http\Header\Accept\FieldValuePart\AcceptFieldValuePart;
12-
use Zend\Mvc\Controller\Plugin\AcceptableViewModelSelector;
1312
use Zend\Http\Request;
1413
use Zend\Mvc\Exception\InvalidArgumentException;
1514
use Zend\Mvc\MvcEvent;

test/Controller/Plugin/ForwardTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace ZendTest\Mvc\Controller\Plugin;
99

1010
use PHPUnit\Framework\TestCase;
11-
use ReflectionClass;
1211
use stdClass;
1312
use Zend\EventManager\EventManager;
1413
use Zend\EventManager\SharedEventManager;
@@ -21,7 +20,6 @@
2120
use Zend\Mvc\Controller\Plugin\Forward as ForwardPlugin;
2221
use Zend\Mvc\Controller\PluginManager;
2322
use Zend\Mvc\Exception\DomainException;
24-
use Zend\Mvc\Exception\InvalidControllerException;
2523
use Zend\Mvc\MvcEvent;
2624
use Zend\Router\RouteMatch;
2725
use Zend\ServiceManager\Config;

test/Controller/RestfulControllerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace ZendTest\Mvc\Controller;
99

1010
use PHPUnit\Framework\TestCase;
11-
use ReflectionClass;
1211
use ReflectionObject;
1312
use stdClass;
1413
use Zend\EventManager\EventManager;

test/Controller/TestAsset/ControllerLoaderAbstractFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
use Interop\Container\ContainerInterface;
1111
use Zend\ServiceManager\Factory\AbstractFactoryInterface;
12-
use Zend\ServiceManager\ServiceLocatorInterface;
1312
use ZendTest\Mvc\TestAsset\PathController;
1413

1514
class ControllerLoaderAbstractFactory implements AbstractFactoryInterface

test/Service/ServiceListenerFactoryTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
namespace ZendTest\Mvc\Service;
99

1010
use PHPUnit\Framework\TestCase;
11-
use ReflectionClass;
12-
use ReflectionProperty;
1311
use Zend\Mvc\Service\ServiceListenerFactory;
1412
use Zend\ServiceManager\ServiceManager;
1513

test/Service/ServiceManagerConfigTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
namespace ZendTest\Mvc\Service;
99

1010
use PHPUnit\Framework\TestCase;
11-
use ReflectionClass;
1211
use stdClass;
1312
use Zend\EventManager\EventManager;
1413
use Zend\EventManager\EventManagerAwareInterface;
1514
use Zend\EventManager\SharedEventManagerInterface;
16-
use Zend\Mvc\Controller\PluginManager;
1715
use Zend\Mvc\Service\ServiceManagerConfig;
1816
use Zend\ServiceManager\Factory\InvokableFactory;
1917
use Zend\ServiceManager\ServiceManager;

test/View/DefaultRendereringStrategyTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace ZendTest\Mvc\View;
99

1010
use PHPUnit\Framework\TestCase;
11-
use Zend\EventManager\Event;
1211
use Zend\EventManager\EventManager;
1312
use Zend\EventManager\SharedEventManager;
1413
use Zend\EventManager\Test\EventListenerIntrospectionTrait;

0 commit comments

Comments
 (0)