From 6113fec3622b93d328fb3efc495b72cd89f91e46 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 2 Jan 2025 20:15:07 +0100 Subject: [PATCH] phpstan level 3 --- composer.json | 6 ++---- phpstan.neon.dist | 2 +- src/Test/EventDispatchingHttpCacheTestCase.php | 2 -- src/Test/WebServerSubscriber.php | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 35ed9375..2210731c 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,7 @@ "php-http/discovery": "^1.12", "php-http/async-client-implementation": "^1.1.0 || ^2.0", "psr/http-client-implementation": "^1.0 || ^2.0", - "psr/http-factory": "^1.0", - "toflar/psr6-symfony-http-cache-store": "^4.2" + "psr/http-factory": "^1.0" }, "require-dev": { "mockery/mockery": "^1.6.0", @@ -38,8 +37,7 @@ "php-http/mock-client": "^1.6.0", "symfony/process": "^6.4|| ^7.0", "symfony/http-kernel": "^6.4|| ^7.0", - "phpunit/phpunit": "^10.5", - "http-interop/http-factory-guzzle": "^0.1.0" + "phpunit/phpunit": "^10.5" }, "conflict": { "toflar/psr6-symfony-http-cache-store": "<2.2.1" diff --git a/phpstan.neon.dist b/phpstan.neon.dist index cd728031..43924227 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,5 @@ parameters: - level: 2 + level: 3 paths: - src diff --git a/src/Test/EventDispatchingHttpCacheTestCase.php b/src/Test/EventDispatchingHttpCacheTestCase.php index 0794e444..8cc80dad 100644 --- a/src/Test/EventDispatchingHttpCacheTestCase.php +++ b/src/Test/EventDispatchingHttpCacheTestCase.php @@ -282,7 +282,6 @@ public function testPreInvalidateCalled(): void $testListener = new TestListener($this, $httpCache, $request); $this->assertTrue(method_exists($httpCache, 'addSubscriber')); $httpCache->addSubscriber($testListener); - $this->assertTrue(method_exists($httpCache, 'addSubscriber')); $httpCache ->method('pass') ->with($request) @@ -311,7 +310,6 @@ public function testPreInvalidateReturnEarly(): void $testListener->preInvalidateResponse = $response; $this->assertTrue(method_exists($httpCache, 'addSubscriber')); $httpCache->addSubscriber($testListener); - $this->assertTrue(method_exists($httpCache, 'addSubscriber')); $httpCache ->expects($this->never()) ->method('pass') diff --git a/src/Test/WebServerSubscriber.php b/src/Test/WebServerSubscriber.php index 8d25bb19..3e26b49f 100644 --- a/src/Test/WebServerSubscriber.php +++ b/src/Test/WebServerSubscriber.php @@ -83,7 +83,7 @@ public function startPhpWebServer(): int $this->waitFor($this->getHostName(), (int) $this->getPort(), 2000); - return $output[0]; + return (int) $output[0]; } public function getHostName(): string