Skip to content

Commit da3f0cf

Browse files
authored
Update README.md
1 parent a428318 commit da3f0cf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -415,14 +415,14 @@ class SomeRandomModifier implements PriceAmendable
415415
*
416416
* @return string
417417
*/
418-
protected $type;
418+
protected string $type;
419419

420420
/**
421421
* Return the modifier type (tax, discount, other, ...)
422422
*
423423
* @return string
424424
*/
425-
public function type() : string
425+
public function type(): string
426426
{
427427
return $this->type;
428428
}
@@ -433,7 +433,7 @@ class SomeRandomModifier implements PriceAmendable
433433
* @param null|string $type
434434
* @return $this
435435
*/
436-
public function setType($type = null)
436+
public function setType(?string $type = null): static
437437
{
438438
$this->type = $type;
439439

@@ -445,7 +445,7 @@ class SomeRandomModifier implements PriceAmendable
445445
*
446446
* @return null|string
447447
*/
448-
public function key() : ?string
448+
public function key(): ?string
449449
{
450450
return 'very-random-tax';
451451
}
@@ -456,7 +456,7 @@ class SomeRandomModifier implements PriceAmendable
456456
*
457457
* @return null|array
458458
*/
459-
public function attributes() : ?array
459+
public function attributes(): ?array
460460
{
461461
return [
462462
'subtitle' => 'Just because we don\'t like you today',
@@ -470,7 +470,7 @@ class SomeRandomModifier implements PriceAmendable
470470
*
471471
* @return bool
472472
*/
473-
public function appliesAfterVat() : bool
473+
public function appliesAfterVat(): bool
474474
{
475475
return false;
476476
}
@@ -485,7 +485,7 @@ class SomeRandomModifier implements PriceAmendable
485485
* @param null|\Whitecube\Price\Vat $vat
486486
* @return null|\Brick\Money\AbstractMoney
487487
*/
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
489489
{
490490
if(date('j') > 1) {
491491
// Do not apply if it's not the first day of the month

0 commit comments

Comments
 (0)