Skip to content

Commit 5647e86

Browse files
Add type to final/internal public/protected properties
1 parent aa8c69b commit 5647e86

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

EventListener/AbstractSessionListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\HttpFoundation\Session\Session;
1818
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1919
use Symfony\Component\HttpFoundation\Session\SessionUtils;
20-
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
2120
use Symfony\Component\HttpKernel\Event\RequestEvent;
2221
use Symfony\Component\HttpKernel\Event\ResponseEvent;
2322
use Symfony\Component\HttpKernel\Exception\UnexpectedSessionUsageException;
@@ -179,7 +178,7 @@ public function onKernelResponse(ResponseEvent $event)
179178
}
180179
}
181180

182-
if ($session instanceof Session ? $session->getUsageIndex() === 0 : !$session->isStarted()) {
181+
if ($session instanceof Session ? 0 === $session->getUsageIndex() : !$session->isStarted()) {
183182
return;
184183
}
185184

EventListener/AddRequestFormatsListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
class AddRequestFormatsListener implements EventSubscriberInterface
2626
{
27-
protected $formats;
27+
private array $formats;
2828

2929
public function __construct(array $formats)
3030
{

EventListener/ProfilerListener.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
*/
3030
class ProfilerListener implements EventSubscriberInterface
3131
{
32-
protected $profiler;
33-
protected $matcher;
34-
protected $onlyException;
35-
protected $onlyMainRequests;
36-
protected $exception;
37-
protected $profiles;
38-
protected $requestStack;
39-
protected $parents;
32+
private Profiler $profiler;
33+
private ?RequestMatcherInterface $matcher;
34+
private bool $onlyException;
35+
private bool $onlyMainRequests;
36+
private ?\Throwable $exception = null;
37+
private \SplObjectStorage $profiles;
38+
private RequestStack $requestStack;
39+
private \SplObjectStorage $parents;
4040

4141
/**
4242
* @param bool $onlyException True if the profiler only collects data when an exception occurs, false otherwise

0 commit comments

Comments
 (0)