Skip to content

Commit a1cbaf2

Browse files
committed
chore: run php-cs-fixer fix
1 parent d4800ea commit a1cbaf2

23 files changed

+37
-88
lines changed

src/DependencyInjection/Compiler/HashGeneratorPass.php

-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ final class HashGeneratorPass implements CompilerPassInterface
2323
{
2424
public const TAG_NAME = 'fos_http_cache.user_context_provider';
2525

26-
/**
27-
* {@inheritdoc}
28-
*/
2926
public function process(ContainerBuilder $container): void
3027
{
3128
if (!$container->has('fos_http_cache.user_context.hash_generator')) {

src/DependencyInjection/Compiler/LoggerPass.php

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
*/
2020
final class LoggerPass implements CompilerPassInterface
2121
{
22-
/**
23-
* {@inheritdoc}
24-
*/
2522
public function process(ContainerBuilder $container): void
2623
{
2724
if (!$container->has('logger') || !$container->has('fos_http_cache.event_listener.log')) {

src/DependencyInjection/Compiler/SessionListenerPass.php

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
*/
2323
final class SessionListenerPass implements CompilerPassInterface
2424
{
25-
/**
26-
* {@inheritdoc}
27-
*/
2825
public function process(ContainerBuilder $container): void
2926
{
3027
if ($container->has('session_listener')) {

src/DependencyInjection/Configuration.php

-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public function __construct($debug)
4848
$this->debug = $debug;
4949
}
5050

51-
/**
52-
* {@inheritdoc}
53-
*/
5451
public function getConfigTreeBuilder(): TreeBuilder
5552
{
5653
$treeBuilder = new TreeBuilder('fos_http_cache');

src/EventListener/AttributesListener.php

-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ public function onKernelRequest(RequestEvent $event): void
5959
}
6060
}
6161

62-
/**
63-
* {@inheritdoc}
64-
*/
6562
public static function getSubscribedEvents(): array
6663
{
6764
return [

src/EventListener/CacheControlListener.php

-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ public function __construct(string|false $debugHeader = false)
6464
$this->debugHeader = $debugHeader;
6565
}
6666

67-
/**
68-
* {@inheritdoc}
69-
*/
7067
public static function getSubscribedEvents(): array
7168
{
7269
return [

src/EventListener/FlashMessageListener.php

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ public function __construct(array $options = [])
3939
$this->options = $resolver->resolve($options);
4040
}
4141

42-
/**
43-
* {@inheritdoc}
44-
*/
4542
public static function getSubscribedEvents(): array
4643
{
4744
return [

src/EventListener/InvalidationListener.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(
4747
CacheManager $cacheManager,
4848
UrlGeneratorInterface $urlGenerator,
4949
RuleMatcherInterface $mustInvalidateRule,
50-
ExpressionLanguage $expressionLanguage = null
50+
?ExpressionLanguage $expressionLanguage = null
5151
) {
5252
$this->cacheManager = $cacheManager;
5353
$this->urlGenerator = $urlGenerator;
@@ -109,9 +109,6 @@ public function onConsoleTerminate(ConsoleEvent $event): void
109109
}
110110
}
111111

112-
/**
113-
* {@inheritdoc}
114-
*/
115112
public static function getSubscribedEvents(): array
116113
{
117114
return [

src/EventListener/SwitchUserListener.php

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public function __construct(UserContextInvalidator $invalidator)
2525
$this->invalidator = $invalidator;
2626
}
2727

28-
/**
29-
* {@inheritdoc}
30-
*/
3128
public static function getSubscribedEvents(): array
3229
{
3330
return [

src/EventListener/TagListener.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(
4343
SymfonyResponseTagger $tagHandler,
4444
RuleMatcherInterface $cacheableRule,
4545
RuleMatcherInterface $mustInvalidateRule,
46-
ExpressionLanguage $expressionLanguage = null
46+
?ExpressionLanguage $expressionLanguage = null
4747
) {
4848
$this->cacheManager = $cacheManager;
4949
$this->symfonyResponseTagger = $tagHandler;
@@ -94,9 +94,6 @@ public function onKernelResponse(ResponseEvent $event): void
9494
}
9595
}
9696

97-
/**
98-
* {@inheritdoc}
99-
*/
10097
public static function getSubscribedEvents(): array
10198
{
10299
return [

src/EventListener/UserContextListener.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ final class UserContextListener implements EventSubscriberInterface
6464
public function __construct(
6565
RequestMatcherInterface $requestMatcher,
6666
HashGenerator $hashGenerator,
67-
RequestMatcherInterface $anonymousRequestMatcher = null,
68-
ResponseTagger $responseTagger = null,
67+
?RequestMatcherInterface $anonymousRequestMatcher = null,
68+
?ResponseTagger $responseTagger = null,
6969
array $options = [],
7070
bool $hasSessionListener = true
7171
) {
@@ -220,9 +220,6 @@ public function onKernelResponse(ResponseEvent $event): void
220220
$response->setVary($vary, true);
221221
}
222222

223-
/**
224-
* {@inheritdoc}
225-
*/
226223
public static function getSubscribedEvents(): array
227224
{
228225
return [

src/FOSHttpCacheBundle.php

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
final class FOSHttpCacheBundle extends Bundle
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
2623
public function build(ContainerBuilder $container): void
2724
{
2825
$container->addCompilerPass(new LoggerPass());

src/Http/ResponseMatcher/ExpressionResponseMatcher.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class ExpressionResponseMatcher implements ResponseMatcherInterface
1919
private ?ExpressionLanguage $expressionLanguage;
2020
private string $expression;
2121

22-
public function __construct(string $expression, ExpressionLanguage $expressionLanguage = null)
22+
public function __construct(string $expression, ?ExpressionLanguage $expressionLanguage = null)
2323
{
2424
$this->expression = $expression;
2525
$this->expressionLanguage = $expressionLanguage;

src/Http/RuleMatcher.php

-7
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ final class RuleMatcher implements RuleMatcherInterface
2929

3030
private ?ResponseMatcherInterface $responseMatcher;
3131

32-
/**
33-
* @param RequestMatcherInterface $requestMatcher|null Request matcher
34-
* @param ResponseMatcherInterface $responseMatcher|null Response matcher
35-
*/
3632
public function __construct(
3733
?RequestMatcherInterface $requestMatcher = null,
3834
?ResponseMatcherInterface $responseMatcher = null
@@ -41,9 +37,6 @@ public function __construct(
4137
$this->responseMatcher = $responseMatcher;
4238
}
4339

44-
/**
45-
* {@inheritdoc}
46-
*/
4740
public function matches(Request $request, Response $response)
4841
{
4942
if ($this->requestMatcher && !$this->requestMatcher->matches($request)) {

src/Twig/CacheTagExtension.php

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ public function __construct(ResponseTagger $responseTagger)
3030
$this->responseTagger = $responseTagger;
3131
}
3232

33-
/**
34-
* {@inheritdoc}
35-
*/
3633
public function getFunctions(): array
3734
{
3835
return [

src/UserContext/RequestMatcher.php

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public function __construct(?string $accept = 'application/vnd.fos.user-context-
2626
$this->method = $method;
2727
}
2828

29-
/**
30-
* {@inheritdoc}
31-
*/
3229
public function matches(Request $request): bool
3330
{
3431
if (null !== $this->accept && $this->accept != $request->headers->get('accept', null)) {

src/UserContext/RoleProvider.php

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ public function __construct(
3535
}
3636

3737
/**
38-
* {@inheritdoc}
39-
*
4038
* @throws InvalidConfigurationException when called without a security context being set
4139
*/
4240
public function updateUserContext(UserContext $context): void

tests/Functional/Fixtures/app/AppKernel.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ protected function build(ContainerBuilder $container): void
4646
public function registerBundles(): iterable
4747
{
4848
return [
49-
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
50-
new \Symfony\Bundle\MonologBundle\MonologBundle(),
51-
new \Symfony\Bundle\SecurityBundle\SecurityBundle(),
52-
new \Symfony\Bundle\TwigBundle\TwigBundle(),
53-
new \FOS\HttpCacheBundle\FOSHttpCacheBundle(),
49+
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
50+
new Symfony\Bundle\MonologBundle\MonologBundle(),
51+
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
52+
new Symfony\Bundle\TwigBundle\TwigBundle(),
53+
new FOS\HttpCacheBundle\FOSHttpCacheBundle(),
5454
];
5555
}
5656

tests/Unit/DependencyInjection/ConfigurationTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ public function testSupportsFastly(): void
402402
$formats = array_map(static function (string $path) {
403403
return __DIR__.'/../../Resources/Fixtures/'.$path;
404404
}, [
405-
'config/fastly.yml',
406-
'config/fastly.xml',
407-
'config/fastly.php',
408-
]);
405+
'config/fastly.yml',
406+
'config/fastly.xml',
407+
'config/fastly.php',
408+
]);
409409

410410
foreach ($formats as $format) {
411411
$this->assertProcessedConfigurationEquals($expectedConfiguration, [$format]);

tests/Unit/DependencyInjection/FOSHttpCacheExtensionTest.php

+20-20
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ public function testConfigLoadFastly(): void
222222
{
223223
$container = $this->createContainer();
224224
$this->extension->load([
225-
[
226-
'proxy_client' => [
227-
'fastly' => [
228-
'service_identifier' => 'test',
229-
'authentication_token' => 'test',
230-
],
231-
],
232-
],
233-
], $container);
225+
[
226+
'proxy_client' => [
227+
'fastly' => [
228+
'service_identifier' => 'test',
229+
'authentication_token' => 'test',
230+
],
231+
],
232+
],
233+
], $container);
234234

235235
$this->assertFalse($container->hasDefinition('fos_http_cache.proxy_client.varnish'));
236236
$this->assertTrue($container->hasDefinition('fos_http_cache.proxy_client.fastly'));
@@ -292,20 +292,20 @@ public function testConfigTagNotSupported(): void
292292
$this->expectExceptionMessage('You can not enable cache tagging with the nginx client');
293293

294294
$config = [
295-
'proxy_client' => [
296-
'nginx' => [
297-
'http' => [
298-
'base_url' => 'my_hostname',
299-
'servers' => [
300-
'127.0.0.1',
301-
],
295+
'proxy_client' => [
296+
'nginx' => [
297+
'http' => [
298+
'base_url' => 'my_hostname',
299+
'servers' => [
300+
'127.0.0.1',
302301
],
303302
],
304303
],
305-
'tags' => [
306-
'enabled' => true,
307-
],
308-
];
304+
],
305+
'tags' => [
306+
'enabled' => true,
307+
],
308+
];
309309

310310
$container = $this->createContainer();
311311
$this->extension->load([$config], $container);

tests/Unit/EventListener/InvalidationListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function testOnConsoleTerminate()
186186
$this->listener->onConsoleTerminate($event);
187187
}
188188

189-
protected function getEvent(Request $request, Response $response = null): TerminateEvent
189+
protected function getEvent(Request $request, ?Response $response = null): TerminateEvent
190190
{
191191
return new TerminateEvent(
192192
\Mockery::mock(HttpKernelInterface::class),

tests/Unit/EventListener/TagListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function testOnKernelResponsePost(): void
185185
$this->listener->onKernelResponse($event);
186186
}
187187

188-
private function getEvent(Request $request, Response $response = null): ResponseEvent
188+
private function getEvent(Request $request, ?Response $response = null): ResponseEvent
189189
{
190190
return new ResponseEvent(
191191
\Mockery::mock(HttpKernelInterface::class),

tests/Unit/EventListener/UserContextListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ protected function getKernelRequestEvent(Request $request, $type = HttpKernelInt
564564
);
565565
}
566566

567-
protected function getKernelResponseEvent(Request $request, Response $response = null, $type = HttpKernelInterface::MAIN_REQUEST): ResponseEvent
567+
protected function getKernelResponseEvent(Request $request, ?Response $response = null, $type = HttpKernelInterface::MAIN_REQUEST): ResponseEvent
568568
{
569569
return new ResponseEvent(
570570
\Mockery::mock(HttpKernelInterface::class),

0 commit comments

Comments
 (0)