Skip to content

Commit ce8a6b3

Browse files
committed
Make ChargeInterface parameter nullable explicitly (PHP 8.4 support)
1 parent 9ca1c41 commit ce8a6b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/charge/modifiers/GrowingDiscount.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function every($string = 1)
8787
return $this->addAddon(self::PERIOD, Period::fromString($string));
8888
}
8989

90-
public function calculateSum(ChargeInterface $charge = null): Money
90+
public function calculateSum(?ChargeInterface $charge = null): Money
9191
{
9292
$sum = parent::calculateSum($charge);
9393

@@ -101,7 +101,7 @@ public function calculateSum(ChargeInterface $charge = null): Money
101101
return $sum;
102102
}
103103

104-
public function getValue(ChargeInterface $charge = null): Discount
104+
public function getValue(?ChargeInterface $charge = null): Discount
105105
{
106106
$time = $charge ? $charge->getAction()->getTime() : new DateTimeImmutable();
107107
$num = (int) $this->countPeriodsPassed($time);

0 commit comments

Comments
 (0)