| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 52 | public function autoGenerateRepresentations(array $sides = null, array $k_bitrate = null, string $sort = "asc") |
||
| 53 | { |
||
| 54 | if (!$this->format) { |
||
| 55 | throw new InvalidArgumentException('First you must set the format of the video'); |
||
| 56 | } |
||
| 57 | |||
| 58 | $reps = new AutoReps($this->getMedia(), $this->getFormat(), $sides, $k_bitrate); |
||
| 59 | $reps->sort($sort); |
||
| 60 | |||
| 61 | foreach ($reps as $rep) { |
||
| 62 | $this->addRepresentation($rep); |
||
| 63 | } |
||
| 64 | |||
| 65 | return $this; |
||
| 66 | } |
||
| 75 | } |