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