Skip to content

Commit 92ab715

Browse files
committed
Changed ?? to a ternary operator
1 parent 8613098 commit 92ab715

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Darryldecode/Cart/ItemCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getPriceSum()
4545
public function __get($name)
4646
{
4747
if ($this->has($name) || $name == 'model') {
48-
return $this->get($name) ?? $this->getAssociatedModel();
48+
return !is_null($this->get($name)) ? $this->get($name) : $this->getAssociatedModel();
4949
}
5050
return null;
5151
}

0 commit comments

Comments
 (0)