Skip to content

Commit 7e5e614

Browse files
committed
Add generic types to traversable implementations
1 parent 7b37c75 commit 7e5e614

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Firewall.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
namespace Symfony\Component\Security\Http;
1313

1414
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15+
use Symfony\Component\HttpFoundation\Request;
1516
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
1617
use Symfony\Component\HttpKernel\Event\RequestEvent;
1718
use Symfony\Component\HttpKernel\KernelEvents;
19+
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
1820
use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface;
1921
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
2022

@@ -32,6 +34,10 @@ class Firewall implements EventSubscriberInterface
3234
{
3335
private $map;
3436
private $dispatcher;
37+
38+
/**
39+
* @var \SplObjectStorage<Request, ExceptionListener>
40+
*/
3541
private $exceptionListeners;
3642

3743
public function __construct(FirewallMapInterface $map, EventDispatcherInterface $dispatcher)

Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ContextListener extends AbstractListener
5858
private $sessionTrackerEnabler;
5959

6060
/**
61-
* @param iterable|UserProviderInterface[] $userProviders
61+
* @param iterable<int, UserProviderInterface> $userProviders
6262
*/
6363
public function __construct(TokenStorageInterface $tokenStorage, iterable $userProviders, string $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null, callable $sessionTrackerEnabler = null)
6464
{

FirewallMapInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace Symfony\Component\Security\Http;
1313

1414
use Symfony\Component\HttpFoundation\Request;
15+
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
16+
use Symfony\Component\Security\Http\Firewall\LogoutListener;
1517

1618
/**
1719
* This interface must be implemented by firewall maps.
@@ -33,7 +35,7 @@ interface FirewallMapInterface
3335
* If there is no logout listener, the third element of the outer array
3436
* must be null.
3537
*
36-
* @return array of the format [[AuthenticationListener], ExceptionListener, LogoutListener]
38+
* @return array{list<callable>, ExceptionListener, LogoutListener}
3739
*/
3840
public function getListeners(Request $request);
3941
}

0 commit comments

Comments
 (0)