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