Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | abstract class AbstractSectionCollection implements ArrayAccess |
||
15 | { |
||
16 | use CollectionTrait; |
||
17 | |||
18 | public function __construct( |
||
19 | public readonly Repository $repository |
||
20 | ) { |
||
21 | } |
||
22 | |||
23 | abstract public function offsetExists(mixed $offset): bool; |
||
24 | |||
25 | /** |
||
26 | * @var array<string, array> |
||
27 | * Loaded sections, where _key_ is a section name and _value_ its data. |
||
28 | * |
||
29 | * @phpstan-ignore-next-line |
||
30 | */ |
||
31 | private array $sections = []; |
||
32 | |||
33 | /** |
||
34 | * @throws LogicException |
||
35 | * @throws ResourceNotFound |
||
36 | */ |
||
37 | #[\ReturnTypeWillChange] |
||
47 | ); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Returns the CLDR path for the offset. |
||
52 | */ |
||
53 | abstract protected function path_for(string $offset): string; |
||
54 | |||
55 | /** |
||
56 | * Returns the data path for the offset. |
||
57 | */ |
||
58 | abstract protected function data_path_for(string $offset): string; |
||
59 | } |
||
60 |