diff --git a/composer.json b/composer.json index f12f10b..0efa797 100644 --- a/composer.json +++ b/composer.json @@ -35,6 +35,7 @@ "ext-openssl": "*", "guzzlehttp/guzzle": "^7.9.2", "spomky-labs/base64url": "^2.0.4", + "symfony/polyfill-php83": "^1.33", "web-token/jwt-library": "^3.4.9|^4.0.6" }, "suggest": { diff --git a/phpstan.neon b/phpstan.neon index 29ba628..d71cbd7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,6 +3,8 @@ parameters: paths: - src reportUnmatchedIgnoredErrors: false + checkMissingOverrideMethodAttribute: true + tipsOfTheDay: false treatPhpDocTypesAsCertain: false ignoreErrors: - identifier: missingType.iterableValue diff --git a/src/MessageSentReport.php b/src/MessageSentReport.php index 27a69e6..3a94fd6 100644 --- a/src/MessageSentReport.php +++ b/src/MessageSentReport.php @@ -93,6 +93,7 @@ public function getResponseContent(): ?string return $this->response?->getBody()->getContents(); } + #[\Override] public function jsonSerialize(): array { return [ diff --git a/src/Subscription.php b/src/Subscription.php index 3639482..740145d 100644 --- a/src/Subscription.php +++ b/src/Subscription.php @@ -72,33 +72,25 @@ public static function create(array $associativeArray): self ); } - /** - * {@inheritDoc} - */ + #[\Override] public function getEndpoint(): string { return $this->endpoint; } - /** - * {@inheritDoc} - */ + #[\Override] public function getPublicKey(): ?string { return $this->publicKey; } - /** - * {@inheritDoc} - */ + #[\Override] public function getAuthToken(): ?string { return $this->authToken; } - /** - * {@inheritDoc} - */ + #[\Override] public function getContentEncoding(): ?string { return $this->contentEncoding?->value; diff --git a/tests/PushServiceTest.php b/tests/PushServiceTest.php index e2a24cb..bea1a1a 100644 --- a/tests/PushServiceTest.php +++ b/tests/PushServiceTest.php @@ -34,9 +34,7 @@ final class PushServiceTest extends PHPUnit\Framework\TestCase /** @var WebPush WebPush with correct api keys */ private WebPush $webPush; - /** - * {@inheritdoc} - */ + #[\Override] public static function setUpBeforeClass(): void { self::$testServiceUrl = 'http://localhost:'.self::$portNumber; diff --git a/tests/WebPushTest.php b/tests/WebPushTest.php index b943fdb..5527a66 100644 --- a/tests/WebPushTest.php +++ b/tests/WebPushTest.php @@ -25,9 +25,7 @@ final class WebPushTest extends PHPUnit\Framework\TestCase /** @var WebPush WebPush with correct api keys */ private WebPush $webPush; - /** - * {@inheritdoc} - */ + #[\Override] public static function setUpBeforeClass(): void { self::$endpoints = [ @@ -52,9 +50,7 @@ public static function setUpBeforeClass(): void } } - /** - * {@inheritdoc} - */ + #[\Override] public function setUp(): void { if (!getenv('CI')) {