From 749a18143936ee557bafe33c963631cffa4d7dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gamez?= Date: Tue, 9 Jan 2024 00:14:11 +0100 Subject: [PATCH] Turn properties `readonly` --- src/Signer/GooglePublicKeys.php | 10 +++++----- src/Validation/Constraint/SignedWithOneInKeySet.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Signer/GooglePublicKeys.php b/src/Signer/GooglePublicKeys.php index 71f30d8..8cd39db 100644 --- a/src/Signer/GooglePublicKeys.php +++ b/src/Signer/GooglePublicKeys.php @@ -21,11 +21,11 @@ final class GooglePublicKeys implements KeySet * @param non-empty-string $certUrl */ public function __construct( - private string $certUrl, - private ClientInterface $client, - private RequestFactoryInterface $requestFactory, - private CacheItemPoolInterface $cache, - private string $cacheKeyPrefix = 'bfj_', + private readonly string $certUrl, + private readonly ClientInterface $client, + private readonly RequestFactoryInterface $requestFactory, + private readonly CacheItemPoolInterface $cache, + private readonly string $cacheKeyPrefix = 'bfj_', ) {} diff --git a/src/Validation/Constraint/SignedWithOneInKeySet.php b/src/Validation/Constraint/SignedWithOneInKeySet.php index 33b708e..8130e3a 100644 --- a/src/Validation/Constraint/SignedWithOneInKeySet.php +++ b/src/Validation/Constraint/SignedWithOneInKeySet.php @@ -12,7 +12,7 @@ final class SignedWithOneInKeySet implements Constraint { - public function __construct(private KeySet $keySet, private Signer $signer) {} + public function __construct(private readonly KeySet $keySet, private readonly Signer $signer) {} public function assert(Token $token): void {