Skip to content

Commit

Permalink
Apply php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
danielburger1337 committed Dec 30, 2024
1 parent f657596 commit c82769a
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/DPoPProofFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
private readonly DPoPTokenEncoderInterface $encoder,
private readonly NonceStorageInterface $nonceStorage,
private readonly NonceStorageKeyFactoryInterface $nonceStorageKeyFactory = new NonceStorageKeyFactory(),
private readonly int $jtiByteLength = 32
private readonly int $jtiByteLength = 32,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/DPoPProofVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(
private readonly ?NonceFactoryInterface $nonceFactory = null,
private readonly ?ReplayAttackDetectorInterface $replayAttackDetector = null,
private readonly int $allowedTimeDrift = 5,
private readonly int $allowedMaxAge = 30
private readonly int $allowedMaxAge = 30,
) {
}

Expand All @@ -62,7 +62,7 @@ public function verifyFromRequest(ServerRequestInterface|Request $request, Acces
match (\count($headers)) {
0 => throw new MissingDPoPProofException('The request did not contain a "DPoP" header.'),
1 => null,
default => throw new InvalidDPoPProofException('The request must contain exactly one "DPoP" header.')
default => throw new InvalidDPoPProofException('The request must contain exactly one "DPoP" header.'),
};

return $this->verifyFromRequestParts($headers[\array_key_first($headers)], $request->getMethod(), $request->getUri(), $boundTo);
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/DPoPReplayAttackException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function __construct(
public readonly DecodedDPoPProof $proof,
string $message = 'The given DPoP proof was already presented.',
int $code = 0,
?\Throwable $previous = null
?\Throwable $previous = null,
) {
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidDPoPNonceException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct(
public readonly string $newNonce,
string $message = '',
int $code = 0,
?\Throwable $previous = null
?\Throwable $previous = null,
) {
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Loader/WebTokenFrameworkDPoPTokenLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WebTokenFrameworkDPoPTokenLoader implements DPoPTokenLoaderInterface
* @param AlgorithmManager $algorithmManager An algorithm manager that contains all the JWA algorithms that are supported.
*/
public function __construct(
private readonly AlgorithmManager $algorithmManager
private readonly AlgorithmManager $algorithmManager,
) {
$this->serializer = new JWSSerializerManager([new CompactSerializer()]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/AccessTokenModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class AccessTokenModel
*/
public function __construct(
public readonly \Stringable|string $accessToken,
public readonly string $jkt
public readonly string $jkt,
) {
}
}
2 changes: 1 addition & 1 deletion src/Model/DPoPProof.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class DPoPProof implements \Stringable
*/
public function __construct(
public readonly JwkInterface $jwk,
public readonly string $proof
public readonly string $proof,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Model/DecodedDPoPProof.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class DecodedDPoPProof
public function __construct(
public readonly JwkInterface $jwk,
public readonly array $payload,
public readonly array $protectedHeader
public readonly array $protectedHeader,
) {
}
}
2 changes: 1 addition & 1 deletion src/Model/WebTokenFrameworkJwk.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class WebTokenFrameworkJwk implements JwkInterface
public function __construct(
public readonly JWK $jwk,
public readonly string $jkt,
public readonly Algorithm $algorithm
public readonly Algorithm $algorithm,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/NonceFactory/CacheNonceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CacheNonceFactory implements NonceFactoryInterface
{
public function __construct(
private readonly CacheItemPoolInterface $cache,
private readonly \DateInterval $ttl = new \DateInterval('PT15M')
private readonly \DateInterval $ttl = new \DateInterval('PT15M'),
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/NonceFactory/WebTokenFrameworkNonceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
private readonly ClockInterface $clock,
private readonly \DateInterval $ttl = new \DateInterval('PT15M'),
private readonly int $allowedTimeDrift = 5,
private readonly ?\Closure $closure = null
private readonly ?\Closure $closure = null,
) {
if ($algorithm instanceof Algorithm) {
$algorithm = new AlgorithmManager([$algorithm]);
Expand Down
2 changes: 1 addition & 1 deletion src/NonceStorage/CacheNonceStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CacheNonceStorage implements NonceStorageInterface
*/
public function __construct(
private readonly CacheItemPoolInterface $cache,
private readonly \DateInterval $ttl = new \DateInterval('PT5M')
private readonly \DateInterval $ttl = new \DateInterval('PT5M'),
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private function createStringableAccessToken(): \Stringable
{
return new class(self::ACCESS_TOKEN) implements \Stringable {
public function __construct(
private readonly string $accessToken
private readonly string $accessToken,
) {
}

Expand Down

0 comments on commit c82769a

Please sign in to comment.