Skip to content

Commit 0c522c1

Browse files
committed
📦 Explicitly specify possible null in type
1 parent a2d6c99 commit 0c522c1

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
'array_syntax' => ['syntax' => 'short'],
1414
'declare_strict_types' => true,
1515
'single_line_throw' => false,
16+
'nullable_type_declaration_for_default_null_value' => true,
1617
'visibility_required' => [
1718
'elements' => [
1819
'const',

src/Collector/Twig/HttpMessageMarkupExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class HttpMessageMarkupExtension extends AbstractExtension
2020

2121
private DataDumperInterface $dumper;
2222

23-
public function __construct(ClonerInterface $cloner = null, DataDumperInterface $dumper = null)
23+
public function __construct(?ClonerInterface $cloner = null, ?DataDumperInterface $dumper = null)
2424
{
2525
$this->cloner = $cloner ?: new VarCloner();
2626
$this->dumper = $dumper ?: new HtmlDumper();

src/Discovery/ConfiguredClientsStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ConfiguredClientsStrategy implements DiscoveryStrategy
2121

2222
private static ?HttpAsyncClient $asyncClient = null;
2323

24-
public function __construct(ClientInterface $httpClient = null, HttpAsyncClient $asyncClient = null)
24+
public function __construct(?ClientInterface $httpClient = null, ?HttpAsyncClient $asyncClient = null)
2525
{
2626
self::$client = $httpClient;
2727
self::$asyncClient = $asyncClient;

0 commit comments

Comments
 (0)