Skip to content

Commit bed16b4

Browse files
fixes
1 parent 1756fcc commit bed16b4

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
],
4141
"cs-check": "phpcs --colors -p ./src ./tests",
4242
"cs-fix": "phpcbf --colors ./src ./tests",
43-
"stan-check": "phpstan analyse ./src -l 7",
43+
"stan-check": "phpstan analyse ./src -l 4",
4444
"test": "phpunit --colors=always --coverage-clover=coverage.xml"
4545
}
4646
}

src/Controller/ControllerFactory.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
use ReflectionClass;
3535
use ReflectionMethod;
3636
use ReflectionNamedType;
37-
use ReflectionParameter;
3837

3938
/**
4039
* @author Robert Pustułka <robert.pustulka@gmail.com>
@@ -43,14 +42,14 @@
4342
class ControllerFactory extends BaseControllerFactory
4443
{
4544
/**
46-
* @var ContainerInterface
45+
* @var \Psr\Container\ContainerInterface
4746
*/
4847
protected $container;
4948

5049
/**
5150
* Constructor.
5251
*
53-
* @param ContainerInterface $container PSR Container
52+
* @param \Psr\Container\ContainerInterface $container PSR Container
5453
*/
5554
public function __construct(ContainerInterface $container)
5655
{
@@ -73,7 +72,7 @@ public function create(ServerRequestInterface $request): Controller
7372
$this->missingController($request);
7473
}
7574

76-
/** @var Controller $controller */
75+
/** @var \Cake\Controller\Controller $controller */
7776
$controller = $this->container->get((string)$className);
7877
$controller->setRequest($request);
7978

@@ -105,7 +104,7 @@ public function invoke($controller): ResponseInterface
105104
/**
106105
* Prepares arguments
107106
*
108-
* @param Controller $controller Controller
107+
* @param \Cake\Controller\Controller $controller Controller
109108
* @return array
110109
*/
111110
private function getArgs($controller): array
@@ -114,7 +113,7 @@ private function getArgs($controller): array
114113
$action = $request->getParam('action');
115114

116115
$reflector = new ReflectionMethod($controller, $action);
117-
/** @var ReflectionParameter[] $parameters */
116+
/** @var \ReflectionParameter[] $parameters */
118117
$parameters = $reflector->getParameters();
119118
$passed = $request->getParam('pass');
120119
$args = [];
@@ -128,7 +127,7 @@ private function getArgs($controller): array
128127
if ($type instanceof ReflectionNamedType) {
129128
$id = $type->getName();
130129
} else {
131-
$id = (string) $type;
130+
$id = (string)$type;
132131
}
133132
} else {
134133
$id = $parameter->getName();

0 commit comments

Comments
 (0)