Skip to content

Commit

Permalink
Use explicitely nullable type
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 24, 2024
1 parent d93dfe2 commit 2cb932e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function with_inject_annotation_and_restriction() {
public function optional_bound_parameter() {
$this->inject->bind(Value::class, $this->newInstance([
'injected' => null,
'#[Inject] __construct' => function(AnnotationsTest $test= null) { $this->injected= $test; }
'#[Inject] __construct' => function(?AnnotationsTest $test= null) { $this->injected= $test; }
]));
Assert::equals($this, $this->inject->get(Value::class)->injected);
}
Expand Down

0 comments on commit 2cb932e

Please sign in to comment.