diff options
author | Arnold Daniels <arnold@jasny.net> | 2017-02-09 09:56:14 +0100 |
---|---|---|
committer | Arnold Daniels <arnold@jasny.net> | 2017-02-09 14:53:26 +0100 |
commit | 142aa6e66c0559b03278f8f62ecec5747b8e019e (patch) | |
tree | 8b92effb73d084019b57419a12d827d56ac8ba7c | |
parent | 412c1244d2998e7b00f4fe10cd9f99155b8cc5ba (diff) | |
download | controller-142aa6e66c0559b03278f8f62ecec5747b8e019e.zip controller-142aa6e66c0559b03278f8f62ecec5747b8e019e.tar.gz controller-142aa6e66c0559b03278f8f62ecec5747b8e019e.tar.bz2 |
Fix issues marked by sensiolabs insights
Missing use statements in ControllerInterface
Other minor things
jasny/view @ beta
-rw-r--r-- | composer.json | 9 | ||||
-rw-r--r-- | src/Controller/CheckRequest.php | 2 | ||||
-rw-r--r-- | src/Controller/ControllerInterface.php | 3 | ||||
-rw-r--r-- | src/Controller/RouteAction.php | 2 |
4 files changed, 10 insertions, 6 deletions
diff --git a/composer.json b/composer.json index fc6c7a3..185e3dd 100644 --- a/composer.json +++ b/composer.json @@ -23,12 +23,13 @@ }, "require-dev": { "jasny/php-code-quality": "^2.0", - "jasny/twig-extensions": "^1.0", - "twig/twig": "^1.26" + "jasny/view": "^1.0.0@beta" }, "suggest": { - "twig/twig": "Needed to work with Twig templates", - "jasny/twig-extensions": "Useful extensions for Twig" + "jasny/view": "Use Twig or PHP templates with PSR-7 support", + "jasny/http-message": "A PSR-7 implementation for handling HTTP requests", + "jasny/router": "A versatile router with PSR-7 support", + "jasny/mvc": "Meta package for Jasny Router, Controller and View" }, "autoload": { "psr-4": { diff --git a/src/Controller/CheckRequest.php b/src/Controller/CheckRequest.php index 478266a..3fe3f1e 100644 --- a/src/Controller/CheckRequest.php +++ b/src/Controller/CheckRequest.php @@ -83,4 +83,4 @@ trait CheckRequest return $referer && parse_url($referer, PHP_URL_HOST) === $host ? $referer : ''; } -}
\ No newline at end of file +} diff --git a/src/Controller/ControllerInterface.php b/src/Controller/ControllerInterface.php index 5fbce25..8225457 100644 --- a/src/Controller/ControllerInterface.php +++ b/src/Controller/ControllerInterface.php @@ -2,6 +2,9 @@ namespace Jasny; +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\ResponseInterface; + /** * Interface for controllers */ diff --git a/src/Controller/RouteAction.php b/src/Controller/RouteAction.php index e8937b0..8051686 100644 --- a/src/Controller/RouteAction.php +++ b/src/Controller/RouteAction.php @@ -153,7 +153,7 @@ trait RouteAction * @param \ReflectionFunctionAbstract $refl * @return array */ - protected function getFunctionArgs($route, \ReflectionFunctionAbstract $refl) + protected function getFunctionArgs(\stdClass $route, \ReflectionFunctionAbstract $refl) { $args = []; $params = $refl->getParameters(); |