Skip to content

Commit

Permalink
style: fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alanpoulain committed Feb 4, 2024
1 parent 952e74e commit cc6f741
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/CoopTilleulsUrlSignerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class CoopTilleulsUrlSignerExtension extends Extension
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
/** @var array{signer: string, signature_key: string, default_expiration: integer, expires_parameter: string, signature_parameter: string} */
/** @var array{signer: string, signature_key: string, default_expiration: int, expires_parameter: string, signature_parameter: string} */
$config = $this->processConfiguration($configuration, $configs);

$container->registerForAutoconfiguration(UrlSignerInterface::class)->addTag('url_signer.signer');
Expand Down
2 changes: 1 addition & 1 deletion UrlSigner/AbstractUrlSigner.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(string $signatureKey, int|string $defaultExpiration,
$this->defaultExpiration = \is_string($defaultExpiration) ? new \DateTimeImmutable($defaultExpiration) : $defaultExpiration;
}

public function sign(string $url, \DateTimeInterface|int $expiration = null, string $signatureKey = null): string
public function sign(string $url, \DateTimeInterface|int|null $expiration = null, ?string $signatureKey = null): string
{
return parent::sign($url, $expiration ?? $this->defaultExpiration, $signatureKey);
}
Expand Down
2 changes: 1 addition & 1 deletion UrlSigner/UrlSignerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

interface UrlSignerInterface extends UrlSigner
{
public function sign(string $url, \DateTimeInterface|int $expiration, string $signatureKey = null): string;
public function sign(string $url, \DateTimeInterface|int $expiration, ?string $signatureKey = null): string;

public static function getName(): string;
}

0 comments on commit cc6f741

Please sign in to comment.