diff --git a/src/DependencyInjection/Compiler/HashGeneratorPass.php b/src/DependencyInjection/Compiler/HashGeneratorPass.php index c5799902..85d0f901 100644 --- a/src/DependencyInjection/Compiler/HashGeneratorPass.php +++ b/src/DependencyInjection/Compiler/HashGeneratorPass.php @@ -23,9 +23,6 @@ final class HashGeneratorPass implements CompilerPassInterface { public const TAG_NAME = 'fos_http_cache.user_context_provider'; - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (!$container->has('fos_http_cache.user_context.hash_generator')) { diff --git a/src/DependencyInjection/Compiler/LoggerPass.php b/src/DependencyInjection/Compiler/LoggerPass.php index 276217ab..9925f486 100644 --- a/src/DependencyInjection/Compiler/LoggerPass.php +++ b/src/DependencyInjection/Compiler/LoggerPass.php @@ -19,9 +19,6 @@ */ final class LoggerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (!$container->has('logger') || !$container->has('fos_http_cache.event_listener.log')) { diff --git a/src/DependencyInjection/Compiler/SessionListenerPass.php b/src/DependencyInjection/Compiler/SessionListenerPass.php index 97b5843d..c8bf0482 100644 --- a/src/DependencyInjection/Compiler/SessionListenerPass.php +++ b/src/DependencyInjection/Compiler/SessionListenerPass.php @@ -22,9 +22,6 @@ */ final class SessionListenerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if ($container->has('session_listener')) { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 255615fd..627075e6 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -48,9 +48,6 @@ public function __construct($debug) $this->debug = $debug; } - /** - * {@inheritdoc} - */ public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('fos_http_cache'); diff --git a/src/EventListener/AttributesListener.php b/src/EventListener/AttributesListener.php index 0991c817..2fe6e165 100644 --- a/src/EventListener/AttributesListener.php +++ b/src/EventListener/AttributesListener.php @@ -59,9 +59,6 @@ public function onKernelRequest(RequestEvent $event): void } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/EventListener/CacheControlListener.php b/src/EventListener/CacheControlListener.php index 87f08c18..681daeaa 100644 --- a/src/EventListener/CacheControlListener.php +++ b/src/EventListener/CacheControlListener.php @@ -64,9 +64,6 @@ public function __construct(string|false $debugHeader = false) $this->debugHeader = $debugHeader; } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/EventListener/FlashMessageListener.php b/src/EventListener/FlashMessageListener.php index 62a9b104..316196a0 100644 --- a/src/EventListener/FlashMessageListener.php +++ b/src/EventListener/FlashMessageListener.php @@ -39,9 +39,6 @@ public function __construct(array $options = []) $this->options = $resolver->resolve($options); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/EventListener/InvalidationListener.php b/src/EventListener/InvalidationListener.php index 7ac5a976..24aac5df 100644 --- a/src/EventListener/InvalidationListener.php +++ b/src/EventListener/InvalidationListener.php @@ -47,7 +47,7 @@ public function __construct( CacheManager $cacheManager, UrlGeneratorInterface $urlGenerator, RuleMatcherInterface $mustInvalidateRule, - ExpressionLanguage $expressionLanguage = null + ?ExpressionLanguage $expressionLanguage = null ) { $this->cacheManager = $cacheManager; $this->urlGenerator = $urlGenerator; @@ -109,9 +109,6 @@ public function onConsoleTerminate(ConsoleEvent $event): void } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/EventListener/SwitchUserListener.php b/src/EventListener/SwitchUserListener.php index 1749a540..ebb7ed9d 100644 --- a/src/EventListener/SwitchUserListener.php +++ b/src/EventListener/SwitchUserListener.php @@ -25,9 +25,6 @@ public function __construct(UserContextInvalidator $invalidator) $this->invalidator = $invalidator; } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/EventListener/TagListener.php b/src/EventListener/TagListener.php index 096423ca..1a949ea6 100644 --- a/src/EventListener/TagListener.php +++ b/src/EventListener/TagListener.php @@ -43,7 +43,7 @@ public function __construct( SymfonyResponseTagger $tagHandler, RuleMatcherInterface $cacheableRule, RuleMatcherInterface $mustInvalidateRule, - ExpressionLanguage $expressionLanguage = null + ?ExpressionLanguage $expressionLanguage = null ) { $this->cacheManager = $cacheManager; $this->symfonyResponseTagger = $tagHandler; @@ -94,9 +94,6 @@ public function onKernelResponse(ResponseEvent $event): void } } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/EventListener/UserContextListener.php b/src/EventListener/UserContextListener.php index e9b85d50..9c822139 100644 --- a/src/EventListener/UserContextListener.php +++ b/src/EventListener/UserContextListener.php @@ -64,8 +64,8 @@ final class UserContextListener implements EventSubscriberInterface public function __construct( RequestMatcherInterface $requestMatcher, HashGenerator $hashGenerator, - RequestMatcherInterface $anonymousRequestMatcher = null, - ResponseTagger $responseTagger = null, + ?RequestMatcherInterface $anonymousRequestMatcher = null, + ?ResponseTagger $responseTagger = null, array $options = [], bool $hasSessionListener = true ) { @@ -220,9 +220,6 @@ public function onKernelResponse(ResponseEvent $event): void $response->setVary($vary, true); } - /** - * {@inheritdoc} - */ public static function getSubscribedEvents(): array { return [ diff --git a/src/FOSHttpCacheBundle.php b/src/FOSHttpCacheBundle.php index 3ab3dd14..26343ead 100644 --- a/src/FOSHttpCacheBundle.php +++ b/src/FOSHttpCacheBundle.php @@ -20,9 +20,6 @@ final class FOSHttpCacheBundle extends Bundle { - /** - * {@inheritdoc} - */ public function build(ContainerBuilder $container): void { $container->addCompilerPass(new LoggerPass()); diff --git a/src/Http/ResponseMatcher/ExpressionResponseMatcher.php b/src/Http/ResponseMatcher/ExpressionResponseMatcher.php index 6c2eee5b..8af9d232 100644 --- a/src/Http/ResponseMatcher/ExpressionResponseMatcher.php +++ b/src/Http/ResponseMatcher/ExpressionResponseMatcher.php @@ -19,7 +19,7 @@ final class ExpressionResponseMatcher implements ResponseMatcherInterface private ?ExpressionLanguage $expressionLanguage; private string $expression; - public function __construct(string $expression, ExpressionLanguage $expressionLanguage = null) + public function __construct(string $expression, ?ExpressionLanguage $expressionLanguage = null) { $this->expression = $expression; $this->expressionLanguage = $expressionLanguage; diff --git a/src/Http/RuleMatcher.php b/src/Http/RuleMatcher.php index f31b1d56..4b752c60 100644 --- a/src/Http/RuleMatcher.php +++ b/src/Http/RuleMatcher.php @@ -29,10 +29,6 @@ final class RuleMatcher implements RuleMatcherInterface private ?ResponseMatcherInterface $responseMatcher; - /** - * @param RequestMatcherInterface $requestMatcher|null Request matcher - * @param ResponseMatcherInterface $responseMatcher|null Response matcher - */ public function __construct( ?RequestMatcherInterface $requestMatcher = null, ?ResponseMatcherInterface $responseMatcher = null @@ -41,9 +37,6 @@ public function __construct( $this->responseMatcher = $responseMatcher; } - /** - * {@inheritdoc} - */ public function matches(Request $request, Response $response) { if ($this->requestMatcher && !$this->requestMatcher->matches($request)) { diff --git a/src/Twig/CacheTagExtension.php b/src/Twig/CacheTagExtension.php index a62831a2..3573e14f 100644 --- a/src/Twig/CacheTagExtension.php +++ b/src/Twig/CacheTagExtension.php @@ -30,9 +30,6 @@ public function __construct(ResponseTagger $responseTagger) $this->responseTagger = $responseTagger; } - /** - * {@inheritdoc} - */ public function getFunctions(): array { return [ diff --git a/src/UserContext/RequestMatcher.php b/src/UserContext/RequestMatcher.php index 0df9f1b6..b60e53d2 100644 --- a/src/UserContext/RequestMatcher.php +++ b/src/UserContext/RequestMatcher.php @@ -26,9 +26,6 @@ public function __construct(?string $accept = 'application/vnd.fos.user-context- $this->method = $method; } - /** - * {@inheritdoc} - */ public function matches(Request $request): bool { if (null !== $this->accept && $this->accept != $request->headers->get('accept', null)) { diff --git a/src/UserContext/RoleProvider.php b/src/UserContext/RoleProvider.php index ef78946c..d95fc78c 100644 --- a/src/UserContext/RoleProvider.php +++ b/src/UserContext/RoleProvider.php @@ -35,8 +35,6 @@ public function __construct( } /** - * {@inheritdoc} - * * @throws InvalidConfigurationException when called without a security context being set */ public function updateUserContext(UserContext $context): void diff --git a/tests/Functional/Fixtures/app/AppKernel.php b/tests/Functional/Fixtures/app/AppKernel.php index f122661e..26fb0fda 100644 --- a/tests/Functional/Fixtures/app/AppKernel.php +++ b/tests/Functional/Fixtures/app/AppKernel.php @@ -46,11 +46,11 @@ protected function build(ContainerBuilder $container): void public function registerBundles(): iterable { return [ - new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), - new \Symfony\Bundle\MonologBundle\MonologBundle(), - new \Symfony\Bundle\SecurityBundle\SecurityBundle(), - new \Symfony\Bundle\TwigBundle\TwigBundle(), - new \FOS\HttpCacheBundle\FOSHttpCacheBundle(), + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Symfony\Bundle\MonologBundle\MonologBundle(), + new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\TwigBundle\TwigBundle(), + new FOS\HttpCacheBundle\FOSHttpCacheBundle(), ]; } diff --git a/tests/Unit/DependencyInjection/ConfigurationTest.php b/tests/Unit/DependencyInjection/ConfigurationTest.php index a3ac1cc8..42488ea9 100644 --- a/tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/tests/Unit/DependencyInjection/ConfigurationTest.php @@ -402,10 +402,10 @@ public function testSupportsFastly(): void $formats = array_map(static function (string $path) { return __DIR__.'/../../Resources/Fixtures/'.$path; }, [ - 'config/fastly.yml', - 'config/fastly.xml', - 'config/fastly.php', - ]); + 'config/fastly.yml', + 'config/fastly.xml', + 'config/fastly.php', + ]); foreach ($formats as $format) { $this->assertProcessedConfigurationEquals($expectedConfiguration, [$format]); diff --git a/tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php b/tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php index 97ce2efd..1e54d628 100644 --- a/tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php +++ b/tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php @@ -222,15 +222,15 @@ public function testConfigLoadFastly(): void { $container = $this->createContainer(); $this->extension->load([ - [ - 'proxy_client' => [ - 'fastly' => [ - 'service_identifier' => 'test', - 'authentication_token' => 'test', - ], - ], - ], - ], $container); + [ + 'proxy_client' => [ + 'fastly' => [ + 'service_identifier' => 'test', + 'authentication_token' => 'test', + ], + ], + ], + ], $container); $this->assertFalse($container->hasDefinition('fos_http_cache.proxy_client.varnish')); $this->assertTrue($container->hasDefinition('fos_http_cache.proxy_client.fastly')); @@ -292,20 +292,20 @@ public function testConfigTagNotSupported(): void $this->expectExceptionMessage('You can not enable cache tagging with the nginx client'); $config = [ - 'proxy_client' => [ - 'nginx' => [ - 'http' => [ - 'base_url' => 'my_hostname', - 'servers' => [ - '127.0.0.1', - ], + 'proxy_client' => [ + 'nginx' => [ + 'http' => [ + 'base_url' => 'my_hostname', + 'servers' => [ + '127.0.0.1', ], ], ], - 'tags' => [ - 'enabled' => true, - ], - ]; + ], + 'tags' => [ + 'enabled' => true, + ], + ]; $container = $this->createContainer(); $this->extension->load([$config], $container); diff --git a/tests/Unit/EventListener/InvalidationListenerTest.php b/tests/Unit/EventListener/InvalidationListenerTest.php index d863c7f1..7a151482 100644 --- a/tests/Unit/EventListener/InvalidationListenerTest.php +++ b/tests/Unit/EventListener/InvalidationListenerTest.php @@ -186,7 +186,7 @@ public function testOnConsoleTerminate() $this->listener->onConsoleTerminate($event); } - protected function getEvent(Request $request, Response $response = null): TerminateEvent + protected function getEvent(Request $request, ?Response $response = null): TerminateEvent { return new TerminateEvent( \Mockery::mock(HttpKernelInterface::class), diff --git a/tests/Unit/EventListener/TagListenerTest.php b/tests/Unit/EventListener/TagListenerTest.php index 195f36e6..00356a7e 100644 --- a/tests/Unit/EventListener/TagListenerTest.php +++ b/tests/Unit/EventListener/TagListenerTest.php @@ -185,7 +185,7 @@ public function testOnKernelResponsePost(): void $this->listener->onKernelResponse($event); } - private function getEvent(Request $request, Response $response = null): ResponseEvent + private function getEvent(Request $request, ?Response $response = null): ResponseEvent { return new ResponseEvent( \Mockery::mock(HttpKernelInterface::class), diff --git a/tests/Unit/EventListener/UserContextListenerTest.php b/tests/Unit/EventListener/UserContextListenerTest.php index 97532d29..8aae1595 100644 --- a/tests/Unit/EventListener/UserContextListenerTest.php +++ b/tests/Unit/EventListener/UserContextListenerTest.php @@ -564,7 +564,7 @@ protected function getKernelRequestEvent(Request $request, $type = HttpKernelInt ); } - protected function getKernelResponseEvent(Request $request, Response $response = null, $type = HttpKernelInterface::MAIN_REQUEST): ResponseEvent + protected function getKernelResponseEvent(Request $request, ?Response $response = null, $type = HttpKernelInterface::MAIN_REQUEST): ResponseEvent { return new ResponseEvent( \Mockery::mock(HttpKernelInterface::class),