@@ -415,14 +415,14 @@ class SomeRandomModifier implements PriceAmendable
415
415
*
416
416
* @return string
417
417
*/
418
- protected $type;
418
+ protected string $type;
419
419
420
420
/**
421
421
* Return the modifier type (tax, discount, other, ...)
422
422
*
423
423
* @return string
424
424
*/
425
- public function type() : string
425
+ public function type(): string
426
426
{
427
427
return $this->type;
428
428
}
@@ -433,7 +433,7 @@ class SomeRandomModifier implements PriceAmendable
433
433
* @param null|string $type
434
434
* @return $this
435
435
*/
436
- public function setType($type = null)
436
+ public function setType(?string $type = null): static
437
437
{
438
438
$this->type = $type;
439
439
@@ -445,7 +445,7 @@ class SomeRandomModifier implements PriceAmendable
445
445
*
446
446
* @return null|string
447
447
*/
448
- public function key() : ?string
448
+ public function key(): ?string
449
449
{
450
450
return 'very-random-tax';
451
451
}
@@ -456,7 +456,7 @@ class SomeRandomModifier implements PriceAmendable
456
456
*
457
457
* @return null|array
458
458
*/
459
- public function attributes() : ?array
459
+ public function attributes(): ?array
460
460
{
461
461
return [
462
462
'subtitle' => 'Just because we don\'t like you today',
@@ -470,7 +470,7 @@ class SomeRandomModifier implements PriceAmendable
470
470
*
471
471
* @return bool
472
472
*/
473
- public function appliesAfterVat() : bool
473
+ public function appliesAfterVat(): bool
474
474
{
475
475
return false;
476
476
}
@@ -485,7 +485,7 @@ class SomeRandomModifier implements PriceAmendable
485
485
* @param null|\Whitecube\Price\Vat $vat
486
486
* @return null|\Brick\Money\AbstractMoney
487
487
*/
488
- public function apply(AbstractMoney $build, $units, $perUnit, AbstractMoney $exclusive = null, Vat $vat = null) : ?AbstractMoney
488
+ public function apply(AbstractMoney $build, float $units, bool $perUnit, AbstractMoney $exclusive = null, Vat $vat = null): ?AbstractMoney
489
489
{
490
490
if(date('j') > 1) {
491
491
// Do not apply if it's not the first day of the month
0 commit comments