Skip to content

Commit 3141777

Browse files
committed
stop marking parameters implicitly as nullable
1 parent c8d73fd commit 3141777

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

LazyProxy/PhpDumper/DumperInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface DumperInterface
2626
* @param bool|null &$asGhostObject Set to true after the call if the proxy is a ghost object
2727
* @param string|null $id
2828
*/
29-
public function isProxyCandidate(Definition $definition/* , bool &$asGhostObject = null, string $id = null */): bool;
29+
public function isProxyCandidate(Definition $definition/* , ?bool &$asGhostObject = null, ?string $id = null */): bool;
3030

3131
/**
3232
* Generates the code to be used to instantiate a proxy in the dumped factory code.
@@ -38,5 +38,5 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $
3838
*
3939
* @param string|null $id
4040
*/
41-
public function getProxyCode(Definition $definition/* , string $id = null */): string;
41+
public function getProxyCode(Definition $definition/* , ?string $id = null */): string;
4242
}

Tests/Fixtures/includes/autowiring_classes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Foo
3030
public static int $counter = 0;
3131

3232
#[Required]
33-
public function cloneFoo(\stdClass $bar = null): static
33+
public function cloneFoo(?\stdClass $bar = null): static
3434
{
3535
++self::$counter;
3636

Tests/Fixtures/includes/autowiring_classes_80.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function __construct(string $arg1, #[AutowireDecorated] AsDecoratorInterf
107107
#[AsDecorator(decorates: \NonExistent::class, onInvalid: ContainerInterface::NULL_ON_INVALID_REFERENCE)]
108108
class AsDecoratorBaz implements AsDecoratorInterface
109109
{
110-
public function __construct(#[AutowireDecorated] AsDecoratorInterface $inner = null)
110+
public function __construct(#[AutowireDecorated] ?AsDecoratorInterface $inner = null)
111111
{
112112
}
113113
}

Tests/Fixtures/includes/classes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function callPassed()
8383

8484
class DummyProxyDumper implements DumperInterface
8585
{
86-
public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool
86+
public function isProxyCandidate(Definition $definition, ?bool &$asGhostObject = null, ?string $id = null): bool
8787
{
8888
$asGhostObject = false;
8989

0 commit comments

Comments
 (0)