ScatterChart::getOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Charts\Material;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ChartOptionsInterface;
6
use CMEN\GoogleChartsBundle\GoogleCharts\Options\ScatterChart\Material\ScatterChartOptions;
7
8
/**
9
 * @author Christophe Meneses
10
 */
11
class ScatterChart extends \CMEN\GoogleChartsBundle\GoogleCharts\Charts\ScatterChart
12
{
13
    /**
14
     * @var ScatterChartOptions
15
     */
16
    protected ChartOptionsInterface $options;
17
18
    public function __construct()
19
    {
20
        parent::__construct();
21
22
        $this->options = new ScatterChartOptions();
23
    }
24
25
    public function getPackage(): string
26
    {
27
        return 'scatter';
28
    }
29
30
    public function getLibrary(): string
31
    {
32
        return 'charts';
33
    }
34
35
    public function getType(): string
36
    {
37
        return 'Scatter';
38
    }
39
40
    public function getOptions(): ScatterChartOptions
41
    {
42
        return $this->options;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->options returns the type CMEN\GoogleChartsBundle\...s\ChartOptionsInterface which includes types incompatible with the type-hinted return CMEN\GoogleChartsBundle\...ial\ScatterChartOptions.
Loading history...
43
    }
44
}
45