Skip to content

Commit

Permalink
phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Cesarano authored and Davide Cesarano committed Nov 14, 2020
1 parent aa2c4fe commit 67b7368
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Embryo/Http/Server/RequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class RequestHandler implements RequestHandlerInterface
protected $middleware = [];

/**
* @var array $middleware
* @var ResponseInterface $response
*/
protected $response;

Expand All @@ -46,7 +46,9 @@ public function __construct(array $middleware = [])
/**
* Add a middleware to the end of the queue.
*
* @param string|MiddlewareInterface $middleware
* @param string|MiddlewareInterface $middleware
* @return void
* @throws \InvalidArgumentException
*/
public function add($middleware)
{
Expand All @@ -62,6 +64,8 @@ public function add($middleware)
* Add a middleware to the beginning of the queue.
*
* @param string|MiddlewareInterface $middleware
* @return void
* @throws \InvalidArgumentException
*/
public function prepend($middleware)
{
Expand All @@ -78,6 +82,7 @@ public function prepend($middleware)
*
* @param ServerRequestInterface $request
* @param ResponseInterface $response
* @return ResponseInterface
*/
public function dispatch(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
{
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
"require": {
"php": ">=7.1",
"psr/http-server-handler": "1.0.0",
"psr/http-server-middleware": "1.0.0"
"psr/http-server-middleware": "1.0.0",
"davidecesarano/embryo-http": "dev-master"
},
"require-dev": {
"davidecesarano/embryo-http": "dev-master",
"middlewares/response-time": "v1.0.0",
"middlewares/uuid": "v1.0.0"
"middlewares/uuid": "v1.0.0",
"phpstan/phpstan": "^0.12.55"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 8 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parameters:
checkMissingIterableValueType: false
treatPhpDocTypesAsCertain: false
checkGenericClassInNonGenericObjectType: false
level: max
paths:
- Embryo
- example

0 comments on commit 67b7368

Please sign in to comment.