diff --git a/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php b/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php index a7811060..aa6e0ac7 100644 --- a/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php +++ b/module/CLI/test/RedirectRule/RedirectRuleHandlerTest.php @@ -71,6 +71,7 @@ class RedirectRuleHandlerTest extends TestCase #[Test, DataProvider('provideExitActions')] public function rulesAreDisplayedWhenRulesListIsEmpty( RedirectRuleHandlerAction $action, + array|null $_, ): void { $comment = fn (string $value) => sprintf('%s', $value); diff --git a/module/Core/test/ShortUrl/Paginator/Adapter/ShortUrlRepositoryAdapterTest.php b/module/Core/test/ShortUrl/Paginator/Adapter/ShortUrlRepositoryAdapterTest.php index 473c2320..37f6a461 100644 --- a/module/Core/test/ShortUrl/Paginator/Adapter/ShortUrlRepositoryAdapterTest.php +++ b/module/Core/test/ShortUrl/Paginator/Adapter/ShortUrlRepositoryAdapterTest.php @@ -81,11 +81,11 @@ class ShortUrlRepositoryAdapterTest extends TestCase yield ['search']; yield ['search', []]; yield ['search', ['foo', 'bar']]; - yield ['search', ['foo', 'bar'], null, null, 'longUrl']; - yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), null, 'longUrl']; - yield ['search', ['foo', 'bar'], null, Chronos::now()->toAtomString(), 'longUrl']; - yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), Chronos::now()->toAtomString(), 'longUrl']; - yield [null, ['foo', 'bar'], Chronos::now()->toAtomString(), null, 'longUrl']; + yield ['search', ['foo', 'bar'], null, null]; + yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), null]; + yield ['search', ['foo', 'bar'], null, Chronos::now()->toAtomString()]; + yield ['search', ['foo', 'bar'], Chronos::now()->toAtomString(), Chronos::now()->toAtomString()]; + yield [null, ['foo', 'bar'], Chronos::now()->toAtomString(), null]; yield [null, ['foo', 'bar'], Chronos::now()->toAtomString()]; yield [null, ['foo', 'bar'], Chronos::now()->toAtomString(), Chronos::now()->toAtomString()]; } diff --git a/module/Rest/src/Action/ShortUrl/DeleteShortUrlAction.php b/module/Rest/src/Action/ShortUrl/DeleteShortUrlAction.php index b2570d36..9c7becb6 100644 --- a/module/Rest/src/Action/ShortUrl/DeleteShortUrlAction.php +++ b/module/Rest/src/Action/ShortUrl/DeleteShortUrlAction.php @@ -17,7 +17,7 @@ class DeleteShortUrlAction extends AbstractRestAction protected const string ROUTE_PATH = '/short-urls/{shortCode}'; protected const array ROUTE_ALLOWED_METHODS = [self::METHOD_DELETE]; - public function __construct(private DeleteShortUrlServiceInterface $deleteShortUrlService) + public function __construct(private readonly DeleteShortUrlServiceInterface $deleteShortUrlService) { } @@ -26,7 +26,7 @@ class DeleteShortUrlAction extends AbstractRestAction $identifier = ShortUrlIdentifier::fromApiRequest($request); $apiKey = AuthenticationMiddleware::apiKeyFromRequest($request); - $this->deleteShortUrlService->deleteByShortCode($identifier, false, $apiKey); + $this->deleteShortUrlService->deleteByShortCode($identifier, apiKey: $apiKey); return new EmptyResponse(); }