Skip to content

Commit 6aff9d9

Browse files
keradusnicolas-grekas
authored andcommitted
DX: nullable_type_declaration
1 parent eee7e8f commit 6aff9d9

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'header_comment' => ['header' => $fileHeaderComment],
3838
'modernize_strpos' => true,
3939
'get_class_to_class_keyword' => true,
40+
'nullable_type_declaration' => true,
4041
])
4142
->setRiskyAllowed(true)
4243
->setFinder(

src/Symfony/Component/DependencyInjection/Attribute/Autoconfigure.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
public ?bool $autowire = null,
3030
public ?array $properties = null,
3131
public array|string|null $configurator = null,
32-
public string|null $constructor = null,
32+
public ?string $constructor = null,
3333
) {
3434
}
3535
}

src/Symfony/Component/Dotenv/Command/DotenvDumpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
final class DotenvDumpCommand extends Command
3131
{
3232
private string $projectDir;
33-
private string|null $defaultEnv;
33+
private ?string $defaultEnv;
3434

3535
public function __construct(string $projectDir, string $defaultEnv = null)
3636
{

src/Symfony/Component/Form/Util/OrderedHashMapIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class OrderedHashMapIterator implements \Iterator
3232
private int $cursorId;
3333
/** @var array<int, int> */
3434
private array $managedCursors;
35-
private string|null $key = null;
35+
private ?string $key = null;
3636
/** @var TValue|null */
3737
private mixed $current = null;
3838

src/Symfony/Component/Notifier/Bridge/Novu/NovuOptions.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
class NovuOptions implements MessageOptionsInterface
2020
{
2121
public function __construct(
22-
private readonly string|null $subscriberId = null,
23-
private readonly string|null $firstName = null,
24-
private readonly string|null $lastName = null,
25-
private readonly string|null $email = null,
26-
private readonly string|null $phone = null,
27-
private readonly string|null $avatar = null,
28-
private readonly string|null $locale = null,
22+
private readonly ?string $subscriberId = null,
23+
private readonly ?string $firstName = null,
24+
private readonly ?string $lastName = null,
25+
private readonly ?string $email = null,
26+
private readonly ?string $phone = null,
27+
private readonly ?string $avatar = null,
28+
private readonly ?string $locale = null,
2929
private readonly array $options = [],
3030
) {
3131
}

src/Symfony/Component/Notifier/Bridge/Novu/NovuSubscriberRecipient.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class NovuSubscriberRecipient implements RecipientInterface
2020
{
2121
public function __construct(
2222
private readonly string $subscriberId,
23-
private readonly string|null $firstName = null,
24-
private readonly string|null $lastName = null,
25-
private readonly string|null $email = null,
26-
private readonly string|null $phone = null,
27-
private readonly string|null $avatar = null,
28-
private readonly string|null $locale = null,
23+
private readonly ?string $firstName = null,
24+
private readonly ?string $lastName = null,
25+
private readonly ?string $email = null,
26+
private readonly ?string $phone = null,
27+
private readonly ?string $avatar = null,
28+
private readonly ?string $locale = null,
2929
) {
3030
}
3131

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