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