Skip to content

Commit

Permalink
[7.x] Use collection get before Augmented Array (#1170)
Browse files Browse the repository at this point in the history
* Use collection get before Augmented Array

* Pint

---------

Co-authored-by: Duncan McClean <[email protected]>
  • Loading branch information
darinlarimore and duncanmcclean authored Oct 12, 2024
1 parent 6461be9 commit 3b1e85f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Tags/CartTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,14 @@ public function wildcard($method)
return $cart->{$method};
}

if (array_key_exists($method, $cart->toAugmentedArray())) {
return $cart->toAugmentedArray()[$method];
}

if ($cart->has($method)) {
return $cart->get($method);
}

if (array_key_exists($method, $cart->toAugmentedArray())) {
return $cart->toAugmentedArray()[$method];
}

return null;
}
}

0 comments on commit 3b1e85f

Please sign in to comment.