Skip to content

Commit 9b58162

Browse files
committed
Add generic types to traversable implementations
1 parent a9f8989 commit 9b58162

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

DataCollector/RequestDataCollector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
*/
3232
class RequestDataCollector extends DataCollector implements EventSubscriberInterface, LateDataCollectorInterface
3333
{
34+
/**
35+
* @var \SplObjectStorage<Request, callable>
36+
*/
3437
private $controllers;
3538
private $sessionUsages = [];
3639
private $requestStack;

DataCollector/RouterDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class RouterDataCollector extends DataCollector
2323
{
2424
/**
25-
* @var \SplObjectStorage
25+
* @var \SplObjectStorage<Request, callable>
2626
*/
2727
protected $controllers;
2828

EventListener/ProfilerListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
namespace Symfony\Component\HttpKernel\EventListener;
1313

1414
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15+
use Symfony\Component\HttpFoundation\Request;
1516
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
1617
use Symfony\Component\HttpFoundation\RequestStack;
1718
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
1819
use Symfony\Component\HttpKernel\Event\ResponseEvent;
1920
use Symfony\Component\HttpKernel\Event\TerminateEvent;
2021
use Symfony\Component\HttpKernel\KernelEvents;
22+
use Symfony\Component\HttpKernel\Profiler\Profile;
2123
use Symfony\Component\HttpKernel\Profiler\Profiler;
2224

2325
/**
@@ -34,9 +36,11 @@ class ProfilerListener implements EventSubscriberInterface
3436
protected $onlyException;
3537
protected $onlyMainRequests;
3638
protected $exception;
39+
/** @var \SplObjectStorage<Request, Profile> */
3740
protected $profiles;
3841
protected $requestStack;
3942
protected $collectParameter;
43+
/** @var \SplObjectStorage<Request, Request|null> */
4044
protected $parents;
4145

4246
/**

HttpCache/Store.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
class Store implements StoreInterface
2626
{
2727
protected $root;
28+
/** @var \SplObjectStorage<Request, string> */
2829
private $keyCache;
29-
30-
/**
31-
* @var array<string, resource>
32-
*/
30+
/** @var array<string, resource> */
3331
private $locks = [];
3432

3533
/**

KernelInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ interface KernelInterface extends HttpKernelInterface
3131
/**
3232
* Returns an array of bundles to register.
3333
*
34-
* @return iterable|BundleInterface[]
34+
* @return iterable<BundleInterface>
3535
*/
3636
public function registerBundles();
3737

0 commit comments

Comments
 (0)