Total Complexity | 9 |
Total Lines | 74 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | /** |
||
24 | * @return mixed |
||
25 | */ |
||
26 | public function getResize() |
||
27 | { |
||
28 | return $this->resize; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param $width |
||
33 | * @param $height |
||
34 | * @return Representation |
||
35 | * @throws Exception |
||
36 | */ |
||
37 | public function setResize(int $width, int $height): Representation |
||
38 | { |
||
39 | if ($width < 1 || $height < 1) { |
||
40 | throw new Exception('Wrong resize value'); |
||
41 | } |
||
42 | |||
43 | $this->width = $width; |
||
44 | $this->height = $height; |
||
45 | $this->resize = $width . "x" . $height; |
||
46 | |||
47 | return $this; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return int |
||
52 | */ |
||
53 | public function getKiloBitrate() |
||
54 | { |
||
55 | return $this->kiloBitrate; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Sets the kiloBitrate value. |
||
60 | * |
||
61 | * @param integer $kiloBitrate |
||
62 | * @return Representation |
||
63 | * @throws Exception |
||
64 | */ |
||
65 | public function setKiloBitrate($kiloBitrate) |
||
74 | } |
||
75 | |||
76 | /** |
||
77 | * @return int |
||
78 | */ |
||
79 | public function getWidth(): int |
||
80 | { |
||
81 | return $this->width; |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * @return int |
||
86 | */ |
||
87 | public function getHeight(): int |
||
90 | } |
||
91 | } |