Skip to content

Commit

Permalink
Use null coalsecing assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad authored and Corey Taylor committed Dec 29, 2023
1 parent 6dbfb63 commit 14a6bc5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ModelAwareTrait.php
Expand Up @@ -69,9 +69,7 @@ trait ModelAwareTrait
*/
protected function _setModelClass(string $name): void
{
if ($this->modelClass === null) {
$this->modelClass = $name;
}
$this->modelClass ??= $name;
}

/**
Expand Down

0 comments on commit 14a6bc5

Please sign in to comment.