From 9a31f53d4db739cba5d9810028ecdb89e6377a13 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 5 Aug 2021 19:47:17 +0200 Subject: [PATCH] Updated to coding standard v2.2.0 --- composer.json | 4 ++-- data/migrations/Version20201102113208.php | 5 +---- module/CLI/src/Command/Api/GenerateKeyCommand.php | 2 +- module/CLI/src/Command/Db/AbstractDatabaseCommand.php | 2 +- module/CLI/src/Command/Db/CreateDatabaseCommand.php | 2 +- .../CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php | 2 +- module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php | 2 +- module/CLI/src/Command/Util/LockedCommandConfig.php | 2 +- module/CLI/src/Command/Visit/LocateVisitsCommand.php | 2 +- module/CLI/src/Util/GeolocationDbUpdater.php | 2 +- .../test/Command/ShortUrl/ListShortUrlsCommandTest.php | 3 +-- module/CLI/test/Util/GeolocationDbUpdaterTest.php | 8 ++------ module/Core/functions/functions.php | 5 +---- module/Core/src/Action/Model/QrCodeParams.php | 2 +- module/Core/src/Action/QrCodeAction.php | 2 +- module/Core/src/Config/NotFoundRedirectResolver.php | 2 +- .../Core/src/Config/NotFoundRedirectResolverInterface.php | 2 +- module/Core/src/Domain/DomainService.php | 2 +- module/Core/src/Domain/Model/DomainItem.php | 2 +- module/Core/src/EventDispatcher/LocateVisit.php | 2 +- module/Core/src/EventDispatcher/NotifyVisitToMercure.php | 2 +- module/Core/src/EventDispatcher/NotifyVisitToWebHooks.php | 2 +- module/Core/src/Importer/ImportedLinksProcessor.php | 2 +- module/Core/src/Mercure/MercureUpdatesGenerator.php | 2 +- module/Core/src/Model/VisitsParams.php | 2 +- .../src/Paginator/Adapter/ShortUrlRepositoryAdapter.php | 2 +- .../Paginator/Adapter/VisitsForTagPaginatorAdapter.php | 2 +- .../Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php | 2 +- .../Core/src/Service/ShortUrl/DeleteShortUrlService.php | 2 +- module/Core/src/Service/ShortUrlService.php | 2 +- module/Core/src/Service/UrlShortener.php | 2 +- .../Core/src/Visit/Persistence/VisitsCountFiltering.php | 2 +- module/Core/src/Visit/Persistence/VisitsListFiltering.php | 2 +- module/Core/src/Visit/VisitsTracker.php | 2 +- .../Middleware/ExtraPathRedirectMiddlewareTest.php | 2 +- module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php | 2 +- module/Rest/src/Action/Visit/OrphanVisitsAction.php | 2 +- module/Rest/src/Middleware/AuthenticationMiddleware.php | 2 +- 38 files changed, 40 insertions(+), 51 deletions(-) diff --git a/composer.json b/composer.json index e94caa16..47fa16d8 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "predis/predis": "^1.1", "pugx/shortid-php": "^0.7", "ramsey/uuid": "^3.9", - "shlinkio/shlink-common": "dev-main#2832a4a as 4.0", + "shlinkio/shlink-common": "dev-main#baef0ca as 4.0", "shlinkio/shlink-config": "^1.2", "shlinkio/shlink-event-dispatcher": "^2.1", "shlinkio/shlink-importer": "^2.3.1", @@ -71,7 +71,7 @@ "phpunit/php-code-coverage": "^9.2", "phpunit/phpunit": "^9.5", "roave/security-advisories": "dev-master", - "shlinkio/php-coding-standard": "~2.1.1", + "shlinkio/php-coding-standard": "~2.2.0", "shlinkio/shlink-test-utils": "^2.2", "symfony/var-dumper": "^5.3", "veewee/composer-run-parallel": "^1.0" diff --git a/data/migrations/Version20201102113208.php b/data/migrations/Version20201102113208.php index 1e1237a4..405ca5c7 100644 --- a/data/migrations/Version20201102113208.php +++ b/data/migrations/Version20201102113208.php @@ -60,10 +60,7 @@ final class Version20201102113208 extends AbstractMigration ->execute(); } - /** - * @return string|int|null - */ - private function resolveOneApiKeyId(Result $result) + private function resolveOneApiKeyId(Result $result): string|int|null { $results = []; while ($row = $result->fetchAssociative()) { diff --git a/module/CLI/src/Command/Api/GenerateKeyCommand.php b/module/CLI/src/Command/Api/GenerateKeyCommand.php index d39c05fa..a43c9e65 100644 --- a/module/CLI/src/Command/Api/GenerateKeyCommand.php +++ b/module/CLI/src/Command/Api/GenerateKeyCommand.php @@ -25,7 +25,7 @@ class GenerateKeyCommand extends BaseCommand public function __construct( private ApiKeyServiceInterface $apiKeyService, - private RoleResolverInterface $roleResolver + private RoleResolverInterface $roleResolver, ) { parent::__construct(); } diff --git a/module/CLI/src/Command/Db/AbstractDatabaseCommand.php b/module/CLI/src/Command/Db/AbstractDatabaseCommand.php index 9cd6e9ea..f803c50c 100644 --- a/module/CLI/src/Command/Db/AbstractDatabaseCommand.php +++ b/module/CLI/src/Command/Db/AbstractDatabaseCommand.php @@ -18,7 +18,7 @@ abstract class AbstractDatabaseCommand extends AbstractLockedCommand public function __construct( LockFactory $locker, private ProcessRunnerInterface $processRunner, - PhpExecutableFinder $phpFinder + PhpExecutableFinder $phpFinder, ) { parent::__construct($locker); $this->phpBinary = $phpFinder->find(false) ?: 'php'; diff --git a/module/CLI/src/Command/Db/CreateDatabaseCommand.php b/module/CLI/src/Command/Db/CreateDatabaseCommand.php index ad3959ca..100dc49d 100644 --- a/module/CLI/src/Command/Db/CreateDatabaseCommand.php +++ b/module/CLI/src/Command/Db/CreateDatabaseCommand.php @@ -26,7 +26,7 @@ class CreateDatabaseCommand extends AbstractDatabaseCommand ProcessRunnerInterface $processRunner, PhpExecutableFinder $phpFinder, private Connection $regularConn, - private Connection $noDbNameConn + private Connection $noDbNameConn, ) { parent::__construct($locker, $processRunner, $phpFinder); } diff --git a/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php b/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php index e0d2babc..6ed3e37c 100644 --- a/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php +++ b/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php @@ -33,7 +33,7 @@ class GenerateShortUrlCommand extends BaseCommand public function __construct( private UrlShortenerInterface $urlShortener, private ShortUrlStringifierInterface $stringifier, - private int $defaultShortCodeLength + private int $defaultShortCodeLength, ) { parent::__construct(); } diff --git a/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php b/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php index ff01030a..53e47d3c 100644 --- a/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php +++ b/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php @@ -35,7 +35,7 @@ class ListShortUrlsCommand extends AbstractWithDateRangeCommand public function __construct( private ShortUrlServiceInterface $shortUrlService, - private DataTransformerInterface $transformer + private DataTransformerInterface $transformer, ) { parent::__construct(); } diff --git a/module/CLI/src/Command/Util/LockedCommandConfig.php b/module/CLI/src/Command/Util/LockedCommandConfig.php index af9d704d..f053d99a 100644 --- a/module/CLI/src/Command/Util/LockedCommandConfig.php +++ b/module/CLI/src/Command/Util/LockedCommandConfig.php @@ -11,7 +11,7 @@ final class LockedCommandConfig private function __construct( private string $lockName, private bool $isBlocking, - private float $ttl = self::DEFAULT_TTL + private float $ttl = self::DEFAULT_TTL, ) { } diff --git a/module/CLI/src/Command/Visit/LocateVisitsCommand.php b/module/CLI/src/Command/Visit/LocateVisitsCommand.php index 7352211e..de66e84e 100644 --- a/module/CLI/src/Command/Visit/LocateVisitsCommand.php +++ b/module/CLI/src/Command/Visit/LocateVisitsCommand.php @@ -35,7 +35,7 @@ class LocateVisitsCommand extends AbstractLockedCommand implements VisitGeolocat public function __construct( private VisitLocatorInterface $visitLocator, private IpLocationResolverInterface $ipLocationResolver, - LockFactory $locker + LockFactory $locker, ) { parent::__construct($locker); } diff --git a/module/CLI/src/Util/GeolocationDbUpdater.php b/module/CLI/src/Util/GeolocationDbUpdater.php index afa0a864..67e9d485 100644 --- a/module/CLI/src/Util/GeolocationDbUpdater.php +++ b/module/CLI/src/Util/GeolocationDbUpdater.php @@ -23,7 +23,7 @@ class GeolocationDbUpdater implements GeolocationDbUpdaterInterface private DbUpdaterInterface $dbUpdater, private Reader $geoLiteDbReader, private LockFactory $locker, - private TrackingOptions $trackingOptions + private TrackingOptions $trackingOptions, ) { } diff --git a/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php b/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php index f4ba2bb1..8150d0c8 100644 --- a/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php @@ -238,11 +238,10 @@ class ListShortUrlsCommandTest extends TestCase } /** - * @param string|array|null $expectedOrderBy * @test * @dataProvider provideOrderBy */ - public function orderByIsProperlyComputed(array $commandArgs, $expectedOrderBy): void + public function orderByIsProperlyComputed(array $commandArgs, string|array|null $expectedOrderBy): void { $listShortUrls = $this->shortUrlService->listShortUrls(ShortUrlsParams::fromRawData([ 'orderBy' => $expectedOrderBy, diff --git a/module/CLI/test/Util/GeolocationDbUpdaterTest.php b/module/CLI/test/Util/GeolocationDbUpdaterTest.php index 0a52660f..83340fc5 100644 --- a/module/CLI/test/Util/GeolocationDbUpdaterTest.php +++ b/module/CLI/test/Util/GeolocationDbUpdaterTest.php @@ -116,9 +116,8 @@ class GeolocationDbUpdaterTest extends TestCase /** * @test * @dataProvider provideSmallDays - * @param string|int $buildEpoch */ - public function databaseIsNotUpdatedIfItIsYoungerThanOneWeek($buildEpoch): void + public function databaseIsNotUpdatedIfItIsYoungerThanOneWeek(string|int $buildEpoch): void { $fileExists = $this->dbUpdater->databaseFileExists()->willReturn(true); $getMeta = $this->geoLiteDbReader->metadata()->willReturn($this->buildMetaWithBuildEpoch($buildEpoch)); @@ -161,10 +160,7 @@ class GeolocationDbUpdaterTest extends TestCase $this->geolocationDbUpdater->checkDbUpdate(); } - /** - * @param string|int $buildEpoch - */ - private function buildMetaWithBuildEpoch($buildEpoch): Metadata + private function buildMetaWithBuildEpoch(string|int $buildEpoch): Metadata { return new Metadata([ 'binary_format_major_version' => '', diff --git a/module/Core/functions/functions.php b/module/Core/functions/functions.php index 888e1833..9ba4bdcc 100644 --- a/module/Core/functions/functions.php +++ b/module/Core/functions/functions.php @@ -55,10 +55,7 @@ function parseDateRangeFromQuery(array $query, string $startDateName, string $en return buildDateRange($startDate, $endDate); } -/** - * @param string|DateTimeInterface|Chronos|null $date - */ -function parseDateField($date): ?Chronos +function parseDateField(string|DateTimeInterface|Chronos|null $date): ?Chronos { if ($date === null || $date instanceof Chronos) { return $date; diff --git a/module/Core/src/Action/Model/QrCodeParams.php b/module/Core/src/Action/Model/QrCodeParams.php index 742d3f07..39cd59a9 100644 --- a/module/Core/src/Action/Model/QrCodeParams.php +++ b/module/Core/src/Action/Model/QrCodeParams.php @@ -28,7 +28,7 @@ final class QrCodeParams private int $size, private int $margin, private WriterInterface $writer, - private ErrorCorrectionLevelInterface $errorCorrectionLevel + private ErrorCorrectionLevelInterface $errorCorrectionLevel, ) { } diff --git a/module/Core/src/Action/QrCodeAction.php b/module/Core/src/Action/QrCodeAction.php index 2f816c98..977e0864 100644 --- a/module/Core/src/Action/QrCodeAction.php +++ b/module/Core/src/Action/QrCodeAction.php @@ -22,7 +22,7 @@ class QrCodeAction implements MiddlewareInterface public function __construct( private ShortUrlResolverInterface $urlResolver, private ShortUrlStringifierInterface $stringifier, - private LoggerInterface $logger + private LoggerInterface $logger, ) { } diff --git a/module/Core/src/Config/NotFoundRedirectResolver.php b/module/Core/src/Config/NotFoundRedirectResolver.php index 14264034..a6a70c31 100644 --- a/module/Core/src/Config/NotFoundRedirectResolver.php +++ b/module/Core/src/Config/NotFoundRedirectResolver.php @@ -16,7 +16,7 @@ class NotFoundRedirectResolver implements NotFoundRedirectResolverInterface public function resolveRedirectResponse( NotFoundType $notFoundType, - NotFoundRedirectConfigInterface $config + NotFoundRedirectConfigInterface $config, ): ?ResponseInterface { return match (true) { $notFoundType->isBaseUrl() && $config->hasBaseUrlRedirect() => diff --git a/module/Core/src/Config/NotFoundRedirectResolverInterface.php b/module/Core/src/Config/NotFoundRedirectResolverInterface.php index a5c55f3d..ab010d2e 100644 --- a/module/Core/src/Config/NotFoundRedirectResolverInterface.php +++ b/module/Core/src/Config/NotFoundRedirectResolverInterface.php @@ -11,6 +11,6 @@ interface NotFoundRedirectResolverInterface { public function resolveRedirectResponse( NotFoundType $notFoundType, - NotFoundRedirectConfigInterface $config + NotFoundRedirectConfigInterface $config, ): ?ResponseInterface; } diff --git a/module/Core/src/Domain/DomainService.php b/module/Core/src/Domain/DomainService.php index 6051c254..b5141324 100644 --- a/module/Core/src/Domain/DomainService.php +++ b/module/Core/src/Domain/DomainService.php @@ -84,7 +84,7 @@ class DomainService implements DomainServiceInterface public function configureNotFoundRedirects( string $authority, NotFoundRedirects $notFoundRedirects, - ?ApiKey $apiKey = null + ?ApiKey $apiKey = null, ): Domain { if ($authority === $this->defaultDomain) { throw InvalidDomainException::forDefaultDomainRedirects(); diff --git a/module/Core/src/Domain/Model/DomainItem.php b/module/Core/src/Domain/Model/DomainItem.php index cfd09d90..909cca7d 100644 --- a/module/Core/src/Domain/Model/DomainItem.php +++ b/module/Core/src/Domain/Model/DomainItem.php @@ -14,7 +14,7 @@ final class DomainItem implements JsonSerializable private function __construct( private string $authority, private NotFoundRedirectConfigInterface $notFoundRedirectConfig, - private bool $isDefault + private bool $isDefault, ) { } diff --git a/module/Core/src/EventDispatcher/LocateVisit.php b/module/Core/src/EventDispatcher/LocateVisit.php index bb6ba1d0..fbd32962 100644 --- a/module/Core/src/EventDispatcher/LocateVisit.php +++ b/module/Core/src/EventDispatcher/LocateVisit.php @@ -24,7 +24,7 @@ class LocateVisit private EntityManagerInterface $em, private LoggerInterface $logger, private DbUpdaterInterface $dbUpdater, - private EventDispatcherInterface $eventDispatcher + private EventDispatcherInterface $eventDispatcher, ) { } diff --git a/module/Core/src/EventDispatcher/NotifyVisitToMercure.php b/module/Core/src/EventDispatcher/NotifyVisitToMercure.php index d1ad8201..ed205f40 100644 --- a/module/Core/src/EventDispatcher/NotifyVisitToMercure.php +++ b/module/Core/src/EventDispatcher/NotifyVisitToMercure.php @@ -21,7 +21,7 @@ class NotifyVisitToMercure private HubInterface $hub, private MercureUpdatesGeneratorInterface $updatesGenerator, private EntityManagerInterface $em, - private LoggerInterface $logger + private LoggerInterface $logger, ) { } diff --git a/module/Core/src/EventDispatcher/NotifyVisitToWebHooks.php b/module/Core/src/EventDispatcher/NotifyVisitToWebHooks.php index 5b4e2818..dcd69b21 100644 --- a/module/Core/src/EventDispatcher/NotifyVisitToWebHooks.php +++ b/module/Core/src/EventDispatcher/NotifyVisitToWebHooks.php @@ -31,7 +31,7 @@ class NotifyVisitToWebHooks /** @var string[] */ private array $webhooks, private DataTransformerInterface $transformer, - private AppOptions $appOptions + private AppOptions $appOptions, ) { } diff --git a/module/Core/src/Importer/ImportedLinksProcessor.php b/module/Core/src/Importer/ImportedLinksProcessor.php index b153430b..cddfbb88 100644 --- a/module/Core/src/Importer/ImportedLinksProcessor.php +++ b/module/Core/src/Importer/ImportedLinksProcessor.php @@ -26,7 +26,7 @@ class ImportedLinksProcessor implements ImportedLinksProcessorInterface private EntityManagerInterface $em, private ShortUrlRelationResolverInterface $relationResolver, private ShortCodeHelperInterface $shortCodeHelper, - private DoctrineBatchHelperInterface $batchHelper + private DoctrineBatchHelperInterface $batchHelper, ) { $this->shortUrlRepo = $this->em->getRepository(ShortUrl::class); } diff --git a/module/Core/src/Mercure/MercureUpdatesGenerator.php b/module/Core/src/Mercure/MercureUpdatesGenerator.php index f2489da3..cc0f785a 100644 --- a/module/Core/src/Mercure/MercureUpdatesGenerator.php +++ b/module/Core/src/Mercure/MercureUpdatesGenerator.php @@ -20,7 +20,7 @@ final class MercureUpdatesGenerator implements MercureUpdatesGeneratorInterface public function __construct( private DataTransformerInterface $shortUrlTransformer, - private DataTransformerInterface $orphanVisitTransformer + private DataTransformerInterface $orphanVisitTransformer, ) { } diff --git a/module/Core/src/Model/VisitsParams.php b/module/Core/src/Model/VisitsParams.php index efe082db..ed98d4d2 100644 --- a/module/Core/src/Model/VisitsParams.php +++ b/module/Core/src/Model/VisitsParams.php @@ -21,7 +21,7 @@ final class VisitsParams ?DateRange $dateRange = null, int $page = self::FIRST_PAGE, ?int $itemsPerPage = null, - private bool $excludeBots = false + private bool $excludeBots = false, ) { $this->dateRange = $dateRange ?? DateRange::emptyInstance(); $this->page = $this->determinePage($page); diff --git a/module/Core/src/Paginator/Adapter/ShortUrlRepositoryAdapter.php b/module/Core/src/Paginator/Adapter/ShortUrlRepositoryAdapter.php index e297b6c0..93b69d33 100644 --- a/module/Core/src/Paginator/Adapter/ShortUrlRepositoryAdapter.php +++ b/module/Core/src/Paginator/Adapter/ShortUrlRepositoryAdapter.php @@ -14,7 +14,7 @@ class ShortUrlRepositoryAdapter implements AdapterInterface public function __construct( private ShortUrlRepositoryInterface $repository, private ShortUrlsParams $params, - private ?ApiKey $apiKey + private ?ApiKey $apiKey, ) { } diff --git a/module/Core/src/Paginator/Adapter/VisitsForTagPaginatorAdapter.php b/module/Core/src/Paginator/Adapter/VisitsForTagPaginatorAdapter.php index dbbf8bb9..20af1598 100644 --- a/module/Core/src/Paginator/Adapter/VisitsForTagPaginatorAdapter.php +++ b/module/Core/src/Paginator/Adapter/VisitsForTagPaginatorAdapter.php @@ -16,7 +16,7 @@ class VisitsForTagPaginatorAdapter extends AbstractCacheableCountPaginatorAdapte private VisitRepositoryInterface $visitRepository, private string $tag, private VisitsParams $params, - private ?ApiKey $apiKey + private ?ApiKey $apiKey, ) { } diff --git a/module/Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php b/module/Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php index fa6833f8..9ff13e3c 100644 --- a/module/Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php +++ b/module/Core/src/Paginator/Adapter/VisitsPaginatorAdapter.php @@ -17,7 +17,7 @@ class VisitsPaginatorAdapter extends AbstractCacheableCountPaginatorAdapter private VisitRepositoryInterface $visitRepository, private ShortUrlIdentifier $identifier, private VisitsParams $params, - private ?Specification $spec + private ?Specification $spec, ) { } diff --git a/module/Core/src/Service/ShortUrl/DeleteShortUrlService.php b/module/Core/src/Service/ShortUrl/DeleteShortUrlService.php index 1bcd5ccb..0732b737 100644 --- a/module/Core/src/Service/ShortUrl/DeleteShortUrlService.php +++ b/module/Core/src/Service/ShortUrl/DeleteShortUrlService.php @@ -16,7 +16,7 @@ class DeleteShortUrlService implements DeleteShortUrlServiceInterface public function __construct( private EntityManagerInterface $em, private DeleteShortUrlsOptions $deleteShortUrlsOptions, - private ShortUrlResolverInterface $urlResolver + private ShortUrlResolverInterface $urlResolver, ) { } diff --git a/module/Core/src/Service/ShortUrlService.php b/module/Core/src/Service/ShortUrlService.php index 2a576ce9..f1e3bf32 100644 --- a/module/Core/src/Service/ShortUrlService.php +++ b/module/Core/src/Service/ShortUrlService.php @@ -25,7 +25,7 @@ class ShortUrlService implements ShortUrlServiceInterface private ORM\EntityManagerInterface $em, private ShortUrlResolverInterface $urlResolver, private ShortUrlTitleResolutionHelperInterface $titleResolutionHelper, - private ShortUrlRelationResolverInterface $relationResolver + private ShortUrlRelationResolverInterface $relationResolver, ) { } diff --git a/module/Core/src/Service/UrlShortener.php b/module/Core/src/Service/UrlShortener.php index 24ac2c70..41779715 100644 --- a/module/Core/src/Service/UrlShortener.php +++ b/module/Core/src/Service/UrlShortener.php @@ -20,7 +20,7 @@ class UrlShortener implements UrlShortenerInterface private ShortUrlTitleResolutionHelperInterface $titleResolutionHelper, private EntityManagerInterface $em, private ShortUrlRelationResolverInterface $relationResolver, - private ShortCodeHelperInterface $shortCodeHelper + private ShortCodeHelperInterface $shortCodeHelper, ) { } diff --git a/module/Core/src/Visit/Persistence/VisitsCountFiltering.php b/module/Core/src/Visit/Persistence/VisitsCountFiltering.php index 9f48275f..bf459768 100644 --- a/module/Core/src/Visit/Persistence/VisitsCountFiltering.php +++ b/module/Core/src/Visit/Persistence/VisitsCountFiltering.php @@ -12,7 +12,7 @@ class VisitsCountFiltering public function __construct( private ?DateRange $dateRange = null, private bool $excludeBots = false, - private ?Specification $spec = null + private ?Specification $spec = null, ) { } diff --git a/module/Core/src/Visit/Persistence/VisitsListFiltering.php b/module/Core/src/Visit/Persistence/VisitsListFiltering.php index 173e308e..fb715182 100644 --- a/module/Core/src/Visit/Persistence/VisitsListFiltering.php +++ b/module/Core/src/Visit/Persistence/VisitsListFiltering.php @@ -14,7 +14,7 @@ final class VisitsListFiltering extends VisitsCountFiltering bool $excludeBots = false, ?Specification $spec = null, private ?int $limit = null, - private ?int $offset = null + private ?int $offset = null, ) { parent::__construct($dateRange, $excludeBots, $spec); } diff --git a/module/Core/src/Visit/VisitsTracker.php b/module/Core/src/Visit/VisitsTracker.php index 523454fc..d5d0dc8e 100644 --- a/module/Core/src/Visit/VisitsTracker.php +++ b/module/Core/src/Visit/VisitsTracker.php @@ -17,7 +17,7 @@ class VisitsTracker implements VisitsTrackerInterface public function __construct( private ORM\EntityManagerInterface $em, private EventDispatcherInterface $eventDispatcher, - private TrackingOptions $options + private TrackingOptions $options, ) { } diff --git a/module/Core/test/ShortUrl/Middleware/ExtraPathRedirectMiddlewareTest.php b/module/Core/test/ShortUrl/Middleware/ExtraPathRedirectMiddlewareTest.php index 24917366..d8997524 100644 --- a/module/Core/test/ShortUrl/Middleware/ExtraPathRedirectMiddlewareTest.php +++ b/module/Core/test/ShortUrl/Middleware/ExtraPathRedirectMiddlewareTest.php @@ -65,7 +65,7 @@ class ExtraPathRedirectMiddlewareTest extends TestCase */ public function handlerIsCalledWhenConfigPreventsRedirectWithExtraPath( bool $appendExtraPath, - ServerRequestInterface $request + ServerRequestInterface $request, ): void { $this->options->appendExtraPath = $appendExtraPath; diff --git a/module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php b/module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php index 075b56e1..054211d4 100644 --- a/module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php +++ b/module/Rest/src/Action/ShortUrl/ListShortUrlsAction.php @@ -23,7 +23,7 @@ class ListShortUrlsAction extends AbstractRestAction public function __construct( private ShortUrlServiceInterface $shortUrlService, - private DataTransformerInterface $transformer + private DataTransformerInterface $transformer, ) { } diff --git a/module/Rest/src/Action/Visit/OrphanVisitsAction.php b/module/Rest/src/Action/Visit/OrphanVisitsAction.php index b05d7b31..2632d70a 100644 --- a/module/Rest/src/Action/Visit/OrphanVisitsAction.php +++ b/module/Rest/src/Action/Visit/OrphanVisitsAction.php @@ -22,7 +22,7 @@ class OrphanVisitsAction extends AbstractRestAction public function __construct( private VisitsStatsHelperInterface $visitsHelper, - private DataTransformerInterface $orphanVisitTransformer + private DataTransformerInterface $orphanVisitTransformer, ) { } diff --git a/module/Rest/src/Middleware/AuthenticationMiddleware.php b/module/Rest/src/Middleware/AuthenticationMiddleware.php index 705bc9c5..25f1fbe5 100644 --- a/module/Rest/src/Middleware/AuthenticationMiddleware.php +++ b/module/Rest/src/Middleware/AuthenticationMiddleware.php @@ -26,7 +26,7 @@ class AuthenticationMiddleware implements MiddlewareInterface, StatusCodeInterfa public function __construct( private ApiKeyServiceInterface $apiKeyService, private array $routesWithoutApiKey, - private array $routesWithQueryApiKey + private array $routesWithQueryApiKey, ) { }