Completed
Push — master ( f6145a...ab3b35 )
by Christophe
02:20
created

BarChart   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 45
rs 10
c 1
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getPackage() 0 4 1
A getLibrary() 0 4 1
A getType() 0 4 1
A getOptions() 0 4 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Charts\Material;
4
5
use CMEN\GoogleChartsBundle\GoogleCharts\Options\BarChart\Material\BarChartOptions;
6
7
/**
8
 * Class BarChart
9
 *
10
 * @author Christophe Meneses
11
 */
12
class BarChart extends \CMEN\GoogleChartsBundle\GoogleCharts\Charts\BarChart
13
{
14
    /**
15
     * BarChart constructor.
16
     */
17
    public function __construct()
18
    {
19
        parent::__construct();
20
21
        $this->options = new BarChartOptions();
22
        $this->options->setBars('horizontal');
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function getPackage()
29
    {
30
        return 'bar';
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36
    protected function getLibrary()
37
    {
38
        return 'charts';
39
    }
40
41
    /**
42
     * @inheritdoc
43
     */
44
    protected function getType()
45
    {
46
        return 'Bar';
47
    }
48
49
    /**
50
     * @return BarChartOptions
51
     */
52
    public function getOptions()
53
    {
54
        return $this->options;
55
    }
56
}
57