| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class SegmentedValues |
||
| 13 | { |
||
| 14 | /** @psalm-var list<SegmentInterface> */ |
||
| 15 | private array $list = []; |
||
| 16 | |||
| 17 | private SegmentFactoryInterface $segmentFactory; |
||
| 18 | |||
| 19 | 6 | public static function factory(?SegmentFactoryInterface $segmentFactory = null): self |
|
| 20 | { |
||
| 21 | 6 | return new self($segmentFactory ?? new SegmentFactory()); |
|
| 22 | } |
||
| 23 | |||
| 24 | 7 | public function __construct(SegmentFactoryInterface $segmentFactory) |
|
| 27 | 7 | } |
|
| 28 | |||
| 29 | 7 | public function fromRaw(array $rawArrays): self |
|
| 36 | } |
||
| 37 | |||
| 38 | /** @return SegmentInterface[] */ |
||
| 39 | 7 | public function list(): array |
|
| 44 |