Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
24 | * @return $this |
||
25 | * @throws Exception |
||
26 | */ |
||
27 | public function addRepresentation(Representation $representation) |
||
28 | { |
||
29 | if (!$this->format) { |
||
30 | throw new Exception('Format has not been set'); |
||
31 | } |
||
32 | |||
33 | $this->representations[] = $representation; |
||
34 | return $this; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return array |
||
39 | */ |
||
40 | public function getRepresentations(): array |
||
41 | { |
||
42 | return $this->representations; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return $this |
||
47 | * @throws Exception |
||
48 | */ |
||
49 | public function autoGenerateRepresentations() |
||
59 | } |
||
60 | |||
61 | } |