Skip to content

Commit f1c8d1f

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent 0c5e5ad commit f1c8d1f

17 files changed

+26
-26
lines changed

ContainerAwareEventManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(ContainerInterface $container, array $subscriberIds
5050
*
5151
* @return void
5252
*/
53-
public function dispatchEvent($eventName, EventArgs $eventArgs = null)
53+
public function dispatchEvent($eventName, ?EventArgs $eventArgs = null)
5454
{
5555
if (!$this->initializedSubscribers) {
5656
$this->initializeSubscribers();

DataCollector/DoctrineDataCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DoctrineDataCollector extends DataCollector
3939
*/
4040
private $loggers = [];
4141

42-
public function __construct(ManagerRegistry $registry, DebugDataHolder $debugDataHolder = null)
42+
public function __construct(ManagerRegistry $registry, ?DebugDataHolder $debugDataHolder = null)
4343
{
4444
$this->registry = $registry;
4545
$this->connections = $registry->getConnectionNames();
@@ -58,7 +58,7 @@ public function addLogger(string $name, DebugStack $logger)
5858
/**
5959
* {@inheritdoc}
6060
*/
61-
public function collect(Request $request, Response $response, \Throwable $exception = null)
61+
public function collect(Request $request, Response $response, ?\Throwable $exception = null)
6262
{
6363
$this->data = [
6464
'queries' => $this->collectQueries(),

Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class DoctrineChoiceLoader extends AbstractChoiceLoader
3535
*
3636
* @param string $class The class name of the loaded objects
3737
*/
38-
public function __construct(ObjectManager $manager, string $class, IdReader $idReader = null, EntityLoaderInterface $objectLoader = null)
38+
public function __construct(ObjectManager $manager, string $class, ?IdReader $idReader = null, ?EntityLoaderInterface $objectLoader = null)
3939
{
4040
$classMetadata = $manager->getClassMetadata($class);
4141

Form/ChoiceList/IdReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function isIntId(): bool
7878
*
7979
* This method assumes that the object has a single-column ID.
8080
*/
81-
public function getIdValue(object $object = null): string
81+
public function getIdValue(?object $object = null): string
8282
{
8383
if (!$object) {
8484
return '';

IdGenerator/UlidGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class UlidGenerator extends AbstractIdGenerator
2121
{
2222
private $factory;
2323

24-
public function __construct(UlidFactory $factory = null)
24+
public function __construct(?UlidFactory $factory = null)
2525
{
2626
$this->factory = $factory;
2727
}

IdGenerator/UuidGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class UuidGenerator extends AbstractIdGenerator
2323
private $factory;
2424
private $entityGetter;
2525

26-
public function __construct(UuidFactory $factory = null)
26+
public function __construct(?UuidFactory $factory = null)
2727
{
2828
$this->protoFactory = $this->factory = $factory ?? new UuidFactory();
2929
}

Logger/DbalLogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DbalLogger implements SQLLogger
2626
protected $logger;
2727
protected $stopwatch;
2828

29-
public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch = null)
29+
public function __construct(?LoggerInterface $logger = null, ?Stopwatch $stopwatch = null)
3030
{
3131
$this->logger = $logger;
3232
$this->stopwatch = $stopwatch;
@@ -37,7 +37,7 @@ public function __construct(LoggerInterface $logger = null, Stopwatch $stopwatch
3737
*
3838
* @return void
3939
*/
40-
public function startQuery($sql, array $params = null, array $types = null)
40+
public function startQuery($sql, ?array $params = null, ?array $types = null)
4141
{
4242
if (null !== $this->stopwatch) {
4343
$this->stopwatch->start('doctrine', 'doctrine');

Messenger/AbstractDoctrineMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class AbstractDoctrineMiddleware implements MiddlewareInterface
2828
protected $managerRegistry;
2929
protected $entityManagerName;
3030

31-
public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null)
31+
public function __construct(ManagerRegistry $managerRegistry, ?string $entityManagerName = null)
3232
{
3333
$this->managerRegistry = $managerRegistry;
3434
$this->entityManagerName = $entityManagerName;

Messenger/DoctrineOpenTransactionLoggerMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class DoctrineOpenTransactionLoggerMiddleware extends AbstractDoctrineMiddleware
2929
/** @var bool */
3030
private $isHandling = false;
3131

32-
public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null, LoggerInterface $logger = null)
32+
public function __construct(ManagerRegistry $managerRegistry, ?string $entityManagerName = null, ?LoggerInterface $logger = null)
3333
{
3434
parent::__construct($managerRegistry, $entityManagerName);
3535

Middleware/Debug/DBAL3/Statement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(
3636
DebugDataHolder $debugDataHolder,
3737
string $connectionName,
3838
string $sql,
39-
Stopwatch $stopwatch = null
39+
?Stopwatch $stopwatch = null
4040
) {
4141
$this->stopwatch = $stopwatch;
4242
$this->connectionName = $connectionName;

0 commit comments

Comments
 (0)