From 885c2dd08c6912c34d498e138b1b0bdf5b922291 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 6 Nov 2024 09:08:52 +0100 Subject: [PATCH] apply latest cs fixer rules --- src/CacheManager.php | 2 +- src/Command/BaseInvalidateCommand.php | 2 +- src/Configuration/InvalidatePath.php | 2 +- src/Configuration/InvalidateRoute.php | 2 +- src/Configuration/Tag.php | 2 +- src/DependencyInjection/Configuration.php | 2 +- src/EventListener/AbstractRuleListener.php | 2 +- src/EventListener/AttributesListener.php | 2 +- src/EventListener/CacheControlListener.php | 4 ++-- src/EventListener/InvalidationListener.php | 2 +- src/EventListener/SwitchUserListener.php | 2 +- src/EventListener/TagListener.php | 2 +- src/EventListener/UserContextListener.php | 2 +- src/Http/RequestMatcher/QueryStringRequestMatcher.php | 2 +- src/Http/ResponseMatcher/ExpressionResponseMatcher.php | 2 +- src/Http/RuleMatcher.php | 2 +- .../Http/Logout/ContextInvalidationSessionLogoutHandler.php | 2 +- src/Twig/CacheTagExtension.php | 2 +- src/UserContext/RequestMatcher.php | 2 +- src/UserContext/RoleProvider.php | 2 +- src/UserContextInvalidator.php | 2 +- .../Functional/Fixtures/Controller/TagAttributeController.php | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/CacheManager.php b/src/CacheManager.php index 1965b852..b2763aea 100644 --- a/src/CacheManager.php +++ b/src/CacheManager.php @@ -31,7 +31,7 @@ class CacheManager extends CacheInvalidator public function __construct( private readonly ProxyClient $cache, - private readonly UrlGeneratorInterface $urlGenerator + private readonly UrlGeneratorInterface $urlGenerator, ) { parent::__construct($cache); } diff --git a/src/Command/BaseInvalidateCommand.php b/src/Command/BaseInvalidateCommand.php index f25c2bd7..513347f8 100644 --- a/src/Command/BaseInvalidateCommand.php +++ b/src/Command/BaseInvalidateCommand.php @@ -26,7 +26,7 @@ abstract class BaseInvalidateCommand extends Command * is automatically loaded. */ public function __construct( - private CacheManager $cacheManager + private CacheManager $cacheManager, ) { parent::__construct(); } diff --git a/src/Configuration/InvalidatePath.php b/src/Configuration/InvalidatePath.php index 5ecc5db0..e20d5e6b 100644 --- a/src/Configuration/InvalidatePath.php +++ b/src/Configuration/InvalidatePath.php @@ -23,7 +23,7 @@ class InvalidatePath * @param string|string[] $data */ public function __construct( - string|array $data = [] + string|array $data = [], ) { $values = []; if (is_string($data)) { diff --git a/src/Configuration/InvalidateRoute.php b/src/Configuration/InvalidateRoute.php index f87975e2..9acd301a 100644 --- a/src/Configuration/InvalidateRoute.php +++ b/src/Configuration/InvalidateRoute.php @@ -20,7 +20,7 @@ class InvalidateRoute public function __construct( string|array $data = [], - array $params = [] + array $params = [], ) { $values = []; if (is_string($data)) { diff --git a/src/Configuration/Tag.php b/src/Configuration/Tag.php index 075926fa..46fc864d 100644 --- a/src/Configuration/Tag.php +++ b/src/Configuration/Tag.php @@ -26,7 +26,7 @@ class Tag public function __construct( string|array $data = [], - ?Expression $expression = null + ?Expression $expression = null, ) { $values = []; if (is_string($data)) { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index dea4c2f0..3fb9ffdc 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -37,7 +37,7 @@ final class Configuration implements ConfigurationInterface { public function __construct( - private readonly bool $debug + private readonly bool $debug, ) { } diff --git a/src/EventListener/AbstractRuleListener.php b/src/EventListener/AbstractRuleListener.php index a68b5c21..96ce991f 100644 --- a/src/EventListener/AbstractRuleListener.php +++ b/src/EventListener/AbstractRuleListener.php @@ -30,7 +30,7 @@ abstract class AbstractRuleListener */ public function addRule( RequestMatcherInterface $requestMatcher, - array $settings = [] + array $settings = [], ): void { $this->rulesMap[] = [$requestMatcher, $settings]; } diff --git a/src/EventListener/AttributesListener.php b/src/EventListener/AttributesListener.php index 59b26d8f..14e14c6f 100644 --- a/src/EventListener/AttributesListener.php +++ b/src/EventListener/AttributesListener.php @@ -18,7 +18,7 @@ final class AttributesListener implements EventSubscriberInterface { public function __construct( - private readonly ControllerResolverInterface $controllerResolver + private readonly ControllerResolverInterface $controllerResolver, ) { } diff --git a/src/EventListener/CacheControlListener.php b/src/EventListener/CacheControlListener.php index 52cdba85..da040ab8 100644 --- a/src/EventListener/CacheControlListener.php +++ b/src/EventListener/CacheControlListener.php @@ -55,7 +55,7 @@ public function __construct( * * @var string|false Name of the header or false to add no header */ - private readonly string|false $debugHeader = false + private readonly string|false $debugHeader = false, ) { } @@ -145,7 +145,7 @@ public function onKernelResponse(ResponseEvent $event): void */ public function addRule( RuleMatcherInterface $ruleMatcher, - array $settings = [] + array $settings = [], ): void { $this->rulesMap[] = [$ruleMatcher, $settings]; } diff --git a/src/EventListener/InvalidationListener.php b/src/EventListener/InvalidationListener.php index 7cc3a7b9..de577261 100644 --- a/src/EventListener/InvalidationListener.php +++ b/src/EventListener/InvalidationListener.php @@ -39,7 +39,7 @@ public function __construct( private readonly CacheManager $cacheManager, private readonly UrlGeneratorInterface $urlGenerator, private readonly RuleMatcherInterface $mustInvalidateRule, - private ?ExpressionLanguage $expressionLanguage = null + private ?ExpressionLanguage $expressionLanguage = null, ) { } diff --git a/src/EventListener/SwitchUserListener.php b/src/EventListener/SwitchUserListener.php index bcb09006..a83c476b 100644 --- a/src/EventListener/SwitchUserListener.php +++ b/src/EventListener/SwitchUserListener.php @@ -19,7 +19,7 @@ final class SwitchUserListener implements EventSubscriberInterface { public function __construct( - private readonly UserContextInvalidator $invalidator + private readonly UserContextInvalidator $invalidator, ) { } diff --git a/src/EventListener/TagListener.php b/src/EventListener/TagListener.php index 4658122a..eb73be61 100644 --- a/src/EventListener/TagListener.php +++ b/src/EventListener/TagListener.php @@ -34,7 +34,7 @@ public function __construct( private readonly SymfonyResponseTagger $symfonyResponseTagger, private readonly RuleMatcherInterface $cacheableRule, private readonly RuleMatcherInterface $mustInvalidateRule, - private ?ExpressionLanguage $expressionLanguage = null + private ?ExpressionLanguage $expressionLanguage = null, ) { } diff --git a/src/EventListener/UserContextListener.php b/src/EventListener/UserContextListener.php index 347e7215..88751341 100644 --- a/src/EventListener/UserContextListener.php +++ b/src/EventListener/UserContextListener.php @@ -58,7 +58,7 @@ public function __construct( * Whether the application has a session listener and therefore could * require the AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER. */ - private readonly bool $hasSessionListener = true + private readonly bool $hasSessionListener = true, ) { $resolver = new OptionsResolver(); $resolver->setDefaults([ diff --git a/src/Http/RequestMatcher/QueryStringRequestMatcher.php b/src/Http/RequestMatcher/QueryStringRequestMatcher.php index 274cacea..1abc8c71 100644 --- a/src/Http/RequestMatcher/QueryStringRequestMatcher.php +++ b/src/Http/RequestMatcher/QueryStringRequestMatcher.php @@ -23,7 +23,7 @@ public function __construct( /** * @var string Regular expression to match the query string part of the request url */ - private readonly string $queryString + private readonly string $queryString, ) { } diff --git a/src/Http/ResponseMatcher/ExpressionResponseMatcher.php b/src/Http/ResponseMatcher/ExpressionResponseMatcher.php index 1b3d4451..e33d521d 100644 --- a/src/Http/ResponseMatcher/ExpressionResponseMatcher.php +++ b/src/Http/ResponseMatcher/ExpressionResponseMatcher.php @@ -18,7 +18,7 @@ final class ExpressionResponseMatcher implements ResponseMatcherInterface { public function __construct( private readonly string $expression, - private ?ExpressionLanguage $expressionLanguage = null + private ?ExpressionLanguage $expressionLanguage = null, ) { } diff --git a/src/Http/RuleMatcher.php b/src/Http/RuleMatcher.php index 60f88e66..3e5fc928 100644 --- a/src/Http/RuleMatcher.php +++ b/src/Http/RuleMatcher.php @@ -27,7 +27,7 @@ final class RuleMatcher implements RuleMatcherInterface { public function __construct( private readonly ?RequestMatcherInterface $requestMatcher = null, - private readonly ?ResponseMatcherInterface $responseMatcher = null + private readonly ?ResponseMatcherInterface $responseMatcher = null, ) { } diff --git a/src/Security/Http/Logout/ContextInvalidationSessionLogoutHandler.php b/src/Security/Http/Logout/ContextInvalidationSessionLogoutHandler.php index 2cb23c8b..2bf45a23 100644 --- a/src/Security/Http/Logout/ContextInvalidationSessionLogoutHandler.php +++ b/src/Security/Http/Logout/ContextInvalidationSessionLogoutHandler.php @@ -18,7 +18,7 @@ final class ContextInvalidationSessionLogoutHandler implements EventSubscriberInterface { public function __construct( - private readonly UserContextInvalidator $invalidator + private readonly UserContextInvalidator $invalidator, ) { } diff --git a/src/Twig/CacheTagExtension.php b/src/Twig/CacheTagExtension.php index 1f431cd5..73af3746 100644 --- a/src/Twig/CacheTagExtension.php +++ b/src/Twig/CacheTagExtension.php @@ -21,7 +21,7 @@ class CacheTagExtension extends AbstractExtension { public function __construct( - private readonly ResponseTagger $responseTagger + private readonly ResponseTagger $responseTagger, ) { } diff --git a/src/UserContext/RequestMatcher.php b/src/UserContext/RequestMatcher.php index f6f4c5b2..105777ee 100644 --- a/src/UserContext/RequestMatcher.php +++ b/src/UserContext/RequestMatcher.php @@ -18,7 +18,7 @@ final class RequestMatcher implements RequestMatcherInterface { public function __construct( private ?string $accept = 'application/vnd.fos.user-context-hash', - private ?string $method = null + private ?string $method = null, ) { } diff --git a/src/UserContext/RoleProvider.php b/src/UserContext/RoleProvider.php index c1955a29..7009848a 100644 --- a/src/UserContext/RoleProvider.php +++ b/src/UserContext/RoleProvider.php @@ -30,7 +30,7 @@ final class RoleProvider implements ContextProvider * a firewall context. */ public function __construct( - private readonly ?TokenStorageInterface $tokenStorage = null + private readonly ?TokenStorageInterface $tokenStorage = null, ) { } diff --git a/src/UserContextInvalidator.php b/src/UserContextInvalidator.php index 248d6f2a..3c938c0e 100644 --- a/src/UserContextInvalidator.php +++ b/src/UserContextInvalidator.php @@ -18,7 +18,7 @@ class UserContextInvalidator public const USER_CONTEXT_TAG_PREFIX = 'fos_http_cache_hashlookup-'; public function __construct( - private readonly TagCapable $tagger + private readonly TagCapable $tagger, ) { } diff --git a/tests/Functional/Fixtures/Controller/TagAttributeController.php b/tests/Functional/Fixtures/Controller/TagAttributeController.php index be3806f6..bed10a29 100644 --- a/tests/Functional/Fixtures/Controller/TagAttributeController.php +++ b/tests/Functional/Fixtures/Controller/TagAttributeController.php @@ -22,7 +22,7 @@ class TagAttributeController extends AbstractController { public function __construct( - private SymfonyResponseTagger $responseTagger + private SymfonyResponseTagger $responseTagger, ) { }