diff --git a/composer.json b/composer.json index d44e877..57fe9f0 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } }, "require-dev": { - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^2.0", "vimeo/psalm": "^5.22", "phpunit/phpunit": "^10", "squizlabs/php_codesniffer": "^3.9", diff --git a/composer.lock b/composer.lock index 9bac331..d32312e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d4cf77ad775f8d0599754284fdef43a5", + "content-hash": "77bd2abd9b403e67a49da35bc500f91f", "packages": [ { "name": "archict/brick", @@ -2591,20 +2591,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "0fcbf194ab63d8159bb70d9aa3e1350051632009" + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/0fcbf194ab63d8159bb70d9aa3e1350051632009", - "reference": "0fcbf194ab63d8159bb70d9aa3e1350051632009", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", + "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -2645,7 +2645,7 @@ "type": "github" } ], - "time": "2024-09-09T08:10:35+00:00" + "time": "2024-11-28T22:19:37+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/include/Router.php b/include/Router.php index 69ee392..899ade4 100644 --- a/include/Router.php +++ b/include/Router.php @@ -29,8 +29,8 @@ final class Router { private RouteCollection $route_collection; - private ?ResponseInterface $response; - private ?ServerRequestInterface $request; + private ?ResponseInterface $response = null; + private ?ServerRequestInterface $request = null; /** * @throws HTTPCodeNotHandledException diff --git a/phpstan.neon b/phpstan.neon index 607d135..dbb68aa 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,5 +2,4 @@ parameters: level: 9 paths: - include - - tests - checkGenericClassInNonGenericObjectType: false \ No newline at end of file + - tests \ No newline at end of file diff --git a/psalm.xml b/psalm.xml index 6b4d490..d18f448 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,7 @@