Skip to content

Commit 180f951

Browse files
committed
[HttpKernel] Add types to private properties
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 5c44ae0 commit 180f951

File tree

63 files changed

+177
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+177
-198
lines changed

Bundle/Bundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class Bundle implements BundleInterface
2929
protected $name;
3030
protected $extension;
3131
protected $path;
32-
private $namespace;
32+
private string $namespace;
3333

3434
/**
3535
* {@inheritdoc}
@@ -92,7 +92,7 @@ public function getContainerExtension(): ?ExtensionInterface
9292
*/
9393
public function getNamespace(): string
9494
{
95-
if (null === $this->namespace) {
95+
if (!isset($this->namespace)) {
9696
$this->parseClassName();
9797
}
9898

CacheClearer/ChainCacheClearer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class ChainCacheClearer implements CacheClearerInterface
2222
{
23-
private $clearers;
23+
private iterable $clearers;
2424

2525
/**
2626
* @param iterable<mixed, CacheClearerInterface> $clearers

CacheClearer/Psr6CacheClearer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class Psr6CacheClearer implements CacheClearerInterface
2020
{
21-
private $pools = [];
21+
private array $pools = [];
2222

2323
/**
2424
* @param array<string, CacheItemPoolInterface> $pools

CacheWarmer/CacheWarmerAggregate.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
*/
2121
class CacheWarmerAggregate implements CacheWarmerInterface
2222
{
23-
private $warmers;
24-
private $debug;
25-
private $deprecationLogsFilepath;
26-
private $optionalsEnabled = false;
27-
private $onlyOptionalsEnabled = false;
23+
private iterable $warmers;
24+
private bool $debug;
25+
private ?string $deprecationLogsFilepath;
26+
private bool $optionalsEnabled = false;
27+
private bool $onlyOptionalsEnabled = false;
2828

2929
/**
3030
* @param iterable<mixed, CacheWarmerInterface> $warmers

Config/FileLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class FileLocator extends BaseFileLocator
2323
{
24-
private $kernel;
24+
private KernelInterface $kernel;
2525

2626
public function __construct(KernelInterface $kernel)
2727
{

Controller/ArgumentResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
*/
2828
final class ArgumentResolver implements ArgumentResolverInterface
2929
{
30-
private $argumentMetadataFactory;
31-
private $argumentValueResolvers;
30+
private ArgumentMetadataFactoryInterface $argumentMetadataFactory;
31+
private iterable $argumentValueResolvers;
3232

3333
/**
3434
* @param iterable<mixed, ArgumentValueResolverInterface> $argumentValueResolvers

Controller/ArgumentResolver/NotTaggedControllerValueResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
final class NotTaggedControllerValueResolver implements ArgumentValueResolverInterface
2626
{
27-
private $container;
27+
private ContainerInterface $container;
2828

2929
public function __construct(ContainerInterface $container)
3030
{

Controller/ArgumentResolver/ServiceValueResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
final class ServiceValueResolver implements ArgumentValueResolverInterface
2626
{
27-
private $container;
27+
private ContainerInterface $container;
2828

2929
public function __construct(ContainerInterface $container)
3030
{

Controller/ArgumentResolver/TraceableValueResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*/
2424
final class TraceableValueResolver implements ArgumentValueResolverInterface
2525
{
26-
private $inner;
27-
private $stopwatch;
26+
private ArgumentValueResolverInterface $inner;
27+
private Stopwatch $stopwatch;
2828

2929
public function __construct(ArgumentValueResolverInterface $inner, Stopwatch $stopwatch)
3030
{

Controller/ControllerResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class ControllerResolver implements ControllerResolverInterface
2525
{
26-
private $logger;
26+
private ?LoggerInterface $logger;
2727

2828
public function __construct(LoggerInterface $logger = null)
2929
{

0 commit comments

Comments
 (0)