Skip to content

Commit

Permalink
minor #193 [ci] php-cs-fixer it up
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow authored Aug 31, 2024
1 parent 0064f90 commit 79ec429
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Generator/VerifyEmailTokenGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class VerifyEmailTokenGenerator
*/
public function __construct(
#[\SensitiveParameter]
private string $signingKey
private string $signingKey,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Model/VerifyEmailSignatureComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class VerifyEmailSignatureComponents
public function __construct(
private \DateTimeInterface $expiresAt,
private string $uri,
private int $generatedAt
private int $generatedAt,
) {
}

Expand Down Expand Up @@ -106,7 +106,7 @@ public function getExpiresAtIntervalInstance(): \DateInterval
$createdAtTime = \DateTimeImmutable::createFromFormat('U', (string) $this->generatedAt);

if (false === $createdAtTime) {
throw new VerifyEmailRuntimeException(sprintf('Unable to create DateTimeInterface instance from "generatedAt": %s', $this->generatedAt));
throw new VerifyEmailRuntimeException(\sprintf('Unable to create DateTimeInterface instance from "generatedAt": %s', $this->generatedAt));
}

return $this->expiresAt->diff($createdAtTime);
Expand Down
4 changes: 2 additions & 2 deletions src/VerifyEmailHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(
private UrlGeneratorInterface $router,
private UriSigner $uriSigner,
private VerifyEmailTokenGenerator $tokenGenerator,
private int $lifetime
private int $lifetime,
) {
}

Expand All @@ -52,7 +52,7 @@ public function generateSignature(string $routeName, string $userId, string $use
$signature = $this->uriSigner->sign($uri);

if (!$expiresAt = \DateTimeImmutable::createFromFormat('U', (string) $expiryTimestamp)) {
throw new VerifyEmailRuntimeException(sprintf('Unable to create DateTimeImmutable from timestamp: %s', $expiryTimestamp));
throw new VerifyEmailRuntimeException(\sprintf('Unable to create DateTimeImmutable from timestamp: %s', $expiryTimestamp));
}

return new VerifyEmailSignatureComponents($expiresAt, $signature, $generatedAt);
Expand Down
2 changes: 1 addition & 1 deletion tests/Acceptance/VerifyEmailAcceptanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private function getBootedKernel(): KernelInterface
final class VerifyEmailAcceptanceFixture
{
public function __construct(
public VerifyEmailHelperInterface $helper
public VerifyEmailHelperInterface $helper,
) {
}
}
2 changes: 1 addition & 1 deletion tests/Unit/VerifyEmailHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testExceptionThrownWithExpiredSignatureFromRequest(): void
{
$timestamp = (new \DateTimeImmutable('-1 seconds'))->getTimestamp();

$request = Request::create(sprintf('/?expires=%s', $timestamp));
$request = Request::create(\sprintf('/?expires=%s', $timestamp));

$this->mockSigner
->expects($this->once())
Expand Down
2 changes: 1 addition & 1 deletion tests/VerifyEmailTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class VerifyEmailTestKernel extends Kernel
public function __construct(
private ?ContainerBuilder $builder = null,
private array $routes = [],
private array $extraBundles = []
private array $extraBundles = [],
) {
parent::__construct('test', true);
}
Expand Down

0 comments on commit 79ec429

Please sign in to comment.