Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | abstract class Panel implements Widgetable |
||
8 | { |
||
9 | protected $width = 6; |
||
10 | |||
11 | public function setWidth($width = 6) |
||
12 | { |
||
13 | $this->validateWidth($width); |
||
14 | |||
15 | $this->width = (int) $width; |
||
16 | |||
17 | return $this; |
||
18 | } |
||
19 | |||
20 | public function width() |
||
21 | { |
||
22 | return $this->width; |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param $width |
||
27 | * |
||
28 | * @throws \Exception |
||
29 | */ |
||
30 | protected function validateWidth($width) |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 |