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 6d3e119 commit 45a63a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions GenericRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ public function getResolver(callable $callable, \ReflectionFunction $reflector =

public function getRunner(?object $application): RunnerInterface
{
if (null === $application) {
$application = static function () { return 0; };
}
$application ??= static function () { return 0; };

if ($application instanceof RunnerInterface) {
return $application;
Expand Down

0 comments on commit 45a63a5

Please sign in to comment.