Skip to content

Commit d28f02a

Browse files
Use ??= more
1 parent f0761ca commit d28f02a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Tests/OptionsResolverTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2252,9 +2252,7 @@ public function testNormalizeNestedValue()
22522252
});
22532253
// defined by subclass
22542254
$this->resolver->setNormalizer('foo', function (Options $options, $resolvedValue) {
2255-
if (null === $resolvedValue['bar']) {
2256-
$resolvedValue['bar'] = 'baz';
2257-
}
2255+
$resolvedValue['bar'] ??= 'baz';
22582256

22592257
return $resolvedValue;
22602258
});

0 commit comments

Comments
 (0)