diff --git a/src/View/Helper/NumberFormat.php b/src/View/Helper/NumberFormat.php index 9de581aa..d9d909c6 100644 --- a/src/View/Helper/NumberFormat.php +++ b/src/View/Helper/NumberFormat.php @@ -48,6 +48,8 @@ class NumberFormat extends AbstractHelper /** * Text attributes. + * + * @var array */ protected array $textAttributes = []; @@ -59,7 +61,8 @@ class NumberFormat extends AbstractHelper /** * Format a number * - * @param int|float $number + * @param int|float $number + * @param array $textAttributes */ public function __invoke( $number, @@ -145,9 +148,9 @@ public function getFormatStyle(): int /** * Set format type to use instead of the default */ - public function setFormatType($formatType): self + public function setFormatType(?int $formatType): self { - $this->formatType = (int) $formatType; + $this->formatType = $formatType; return $this; } @@ -235,11 +238,17 @@ public function getLocale(): string return $this->locale; } + /** + * @return array + */ public function getTextAttributes(): array { return $this->textAttributes; } + /** + * @param array $textAttributes + */ public function setTextAttributes(array $textAttributes): self { $this->textAttributes = $textAttributes;