The doc comment array<string, float|int|numeric-string> at position 8 could not be parsed: Unknown type name 'numeric-string' at position 8 in array<string, float|int|numeric-string>.
Loading history...
31
*/
32
private array $sequence = [];
33
34
public function __construct(
35
private readonly Units $units
36
) {
37
}
38
39
public function __toString(): string
40
{
41
return $this->format();
42
}
43
44
private function get_as_long(): string
45
{
46
return $this->format(UnitLength::LONG);
47
}
48
49
private function get_as_short(): string
50
{
51
return $this->format(UnitLength::SHORT);
52
}
53
54
private function get_as_narrow(): string
55
{
56
return $this->format(UnitLength::NARROW);
57
}
58
59
/**
60
* Formats the sequence.
61
*/
62
public function format(UnitLength $length = Units::DEFAULT_LENGTH): string