Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class Entity |
||
14 | { |
||
15 | protected ?IFileFormat $formatClass = null; |
||
16 | /** @var string[] */ |
||
17 | protected array $storage = []; |
||
18 | |||
19 | 1 | public function __construct(IFileFormat $formatClass) |
|
20 | { |
||
21 | 1 | $this->formatClass = $formatClass; |
|
22 | } |
||
23 | |||
24 | /** |
||
25 | * @codeCoverageIgnore why someone would run that?! |
||
26 | */ |
||
27 | private function __clone() |
||
28 | { |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return string[] |
||
33 | */ |
||
34 | 1 | public function get(): array |
|
35 | { |
||
36 | 1 | return $this->storage; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param string[] $content |
||
41 | */ |
||
42 | 1 | public function set(array $content): void |
|
45 | } |
||
46 | |||
47 | 1 | public function getFormat(): ?IFileFormat |
|
50 | } |
||
51 | } |
||
52 |