Skip to content

Commit f4118e1

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent 09cc9c7 commit f4118e1

File tree

1,243 files changed

+1988
-1987
lines changed

Some content is hidden

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

1,243 files changed

+1988
-1987
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'@Symfony:risky' => true,
3131
'protected_to_private' => false,
3232
'native_constant_invocation' => ['strict' => false],
33+
'nullable_type_declaration_for_default_null_value' => true,
3334
'header_comment' => ['header' => $fileHeaderComment],
3435
])
3536
->setRiskyAllowed(true)

src/Symfony/Bridge/Doctrine/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();

src/Symfony/Bridge/Doctrine/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(),

src/Symfony/Bridge/Doctrine/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

src/Symfony/Bridge/Doctrine/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 '';

src/Symfony/Bridge/Doctrine/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
}

src/Symfony/Bridge/Doctrine/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
}

src/Symfony/Bridge/Doctrine/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');

src/Symfony/Bridge/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;

src/Symfony/Bridge/Doctrine/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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy