Skip to content

Commit 467ec97

Browse files
Add more explicit nullable types for default null values
1 parent a078ef2 commit 467ec97

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Tests/Fixtures/FooInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ interface FooInterface
77
/**
88
* Hello.
99
*/
10-
public function foo(?\stdClass $a, \stdClass $b = null);
10+
public function foo(?\stdClass $a, ?\stdClass $b = null);
1111
}

Tests/Fixtures/Twig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class __TwigTemplate_VarDumperFixture_u75a09 extends AbstractTwigTemplate
1818
{
1919
private $path;
2020

21-
public function __construct(Twig\Environment $env = null, $path = null)
21+
public function __construct(?Twig\Environment $env = null, $path = null)
2222
{
2323
if (null !== $env) {
2424
parent::__construct($env);

Tests/Fixtures/dumb-var.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DumbFoo
2222
'[]' => [],
2323
'res' => $g,
2424
'obj' => $foo,
25-
'closure' => function ($a, \PDO &$b = null) {},
25+
'closure' => function ($a, ?\PDO &$b = null) {},
2626
'line' => __LINE__ - 1,
2727
'nobj' => [(object) []],
2828
];

0 commit comments

Comments
 (0)