| Total Complexity | 6 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class Sequence |
||
| 19 | { |
||
| 20 | use SequenceCompanion; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @uses get_as_long |
||
| 24 | * @uses get_as_short |
||
| 25 | * @uses get_as_narrow |
||
| 26 | */ |
||
| 27 | use AccessorTrait; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var array<string, float|int|numeric-string> |
||
|
|
|||
| 31 | */ |
||
| 32 | private array $sequence = []; |
||
| 33 | |||
| 34 | public function __construct( |
||
| 37 | } |
||
| 38 | |||
| 39 | public function __toString(): string |
||
| 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 |
||
| 65 | } |
||
| 66 | } |
||
| 67 |