Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | trait TContent |
||
14 | { |
||
15 | /** @var string */ |
||
16 | protected $contentKey = ''; |
||
17 | |||
18 | 17 | public function setContentKey(string $contentKey): self |
|
19 | { |
||
20 | 17 | $this->contentKey = $contentKey; |
|
21 | 17 | return $this; |
|
22 | } |
||
23 | |||
24 | /** |
||
25 | * @throws MapperException |
||
26 | * @return string |
||
27 | */ |
||
28 | 10 | public function getContentKey(): string |
|
29 | { |
||
30 | 10 | $this->checkContentKey(); |
|
31 | 9 | return $this->contentKey; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @throws MapperException |
||
36 | */ |
||
37 | 10 | protected function checkContentKey(): void |
|
41 | } |
||
42 | } |
||
43 | } |
||
44 |