Conditions | 4 |
Paths | 6 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
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 | } |
||
71 | } |