Skip to content
This repository was archived by the owner on Aug 18, 2023. It is now read-only.

Commit 79a387d

Browse files
author
Robert Kummer
committed
fixed order of filtered values
1 parent 00a4cf2 commit 79a387d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Ipunkt/Subscriptions/Plans/Plan.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ public function can($feature, $value = null): bool
169169
*
170170
* @return Benefit|null
171171
*/
172-
public function feature($feature)
172+
public function feature(string $feature): ?Benefit
173173
{
174-
return $this->benefits()->first(function ($key, Benefit $benefit) use ($feature) {
174+
return $this->benefits()->first(function (Benefit $benefit) use ($feature) {
175175
return $benefit->feature() === strtoupper($feature);
176176
});
177177
}
@@ -241,7 +241,7 @@ public function findPaymentOption($paymentOption)
241241
{
242242
$paymentOption = strtoupper($paymentOption);
243243

244-
return $this->paymentOptions()->first(function ($index, PaymentOption $p) use ($paymentOption) {
244+
return $this->paymentOptions()->first(function (PaymentOption $p) use ($paymentOption) {
245245
if ($p->payment() == $paymentOption) {
246246
return $p;
247247
}

0 commit comments

Comments
 (0)