| Total Complexity | 8 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 18 | trait Representations |
||
| 19 | { |
||
| 20 | /** @var array */ |
||
| 21 | protected $representations = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return $this |
||
| 25 | */ |
||
| 26 | public function addRepresentations() |
||
| 27 | { |
||
| 28 | $this->checkFormat(); |
||
| 29 | $reps = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args(); |
||
| 30 | |||
| 31 | foreach ($reps as $rep) { |
||
| 32 | if (!$rep instanceof Representation) { |
||
| 33 | throw new InvalidArgumentException('Representations must be instance of Representation object'); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | $this->representations = $reps; |
||
| 38 | return $this; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function getRepresentations(): array |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param array $side_values |
||
| 51 | * @param array|null $k_bitrate_values |
||
| 52 | * @return $this |
||
| 53 | */ |
||
| 54 | public function autoGenerateRepresentations(array $side_values = null, array $k_bitrate_values = null) |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * check whether format is set or nor |
||
| 64 | */ |
||
| 65 | private function checkFormat() |
||
| 71 | } |