Skip to content

Commit

Permalink
Use ??= more
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 2, 2022
1 parent f0761ca commit d28f02a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Tests/OptionsResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2252,9 +2252,7 @@ public function testNormalizeNestedValue()
});
// defined by subclass
$this->resolver->setNormalizer('foo', function (Options $options, $resolvedValue) {
if (null === $resolvedValue['bar']) {
$resolvedValue['bar'] = 'baz';
}
$resolvedValue['bar'] ??= 'baz';

return $resolvedValue;
});
Expand Down

0 comments on commit d28f02a

Please sign in to comment.