Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 40% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class TreeMapChart extends Chart |
||
13 | { |
||
14 | /** |
||
15 | * @var TreeMapChartOptions |
||
16 | */ |
||
17 | protected $options; |
||
18 | |||
19 | 1 | public function __construct() |
|
20 | { |
||
21 | 1 | parent::__construct(); |
|
22 | |||
23 | 1 | $this->options = new TreeMapChartOptions(); |
|
24 | 1 | } |
|
25 | |||
26 | public function getType() |
||
27 | { |
||
28 | return 'TreeMap'; |
||
29 | } |
||
30 | |||
31 | public function getPackage() |
||
32 | { |
||
33 | return 'treemap'; |
||
34 | } |
||
35 | |||
36 | 1 | public function getAvailableEventTypes() |
|
37 | { |
||
38 | return [ |
||
39 | 1 | EventType::ON_MOUSE_OUT, |
|
40 | EventType::ON_MOUSE_OVER, |
||
41 | EventType::READY, |
||
42 | EventType::ROLLUP, |
||
43 | EventType::SELECT, |
||
44 | ]; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return TreeMapChartOptions |
||
49 | */ |
||
50 | public function getOptions() |
||
51 | { |
||
52 | return $this->options; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param TreeMapChartOptions $options |
||
57 | * |
||
58 | * @return TreeMapChart |
||
59 | */ |
||
60 | public function setOptions($options) |
||
65 | } |
||
66 | } |
||
67 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: