Passed
Pull Request — master (#26)
by Christophe
03:34
created

Candlestick   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 36.36%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 56
ccs 4
cts 11
cp 0.3636
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFallingColor() 0 4 1
A getRisingColor() 0 4 1
A setHollowIsRising() 0 6 1
1
<?php
2
3
namespace CMEN\GoogleChartsBundle\GoogleCharts\Options;
4
5
/**
6
 * @author Christophe Meneses
7
 */
8
class Candlestick
9
{
10
    /**
11
     * If true, rising candles will appear hollow and falling candles will appear solid, otherwise, the opposite.
12
     *
13
     * @var bool
14
     */
15
    protected $hollowIsRising;
16
17
    /**
18
     * @var FallingColor
19
     */
20
    protected $fallingColor;
21
22
    /**
23
     * @var RisingColor
24
     */
25
    protected $risingColor;
26
27
    /**
28
     * Candlestick constructor.
29
     */
30 1
    public function __construct()
31
    {
32 1
        $this->fallingColor = new FallingColor();
33 1
        $this->risingColor = new RisingColor();
34 1
    }
35
36
    /**
37
     * @return FallingColor
38
     */
39
    public function getFallingColor()
40
    {
41
        return $this->fallingColor;
42
    }
43
44
    /**
45
     * @return RisingColor
46
     */
47
    public function getRisingColor()
48
    {
49
        return $this->risingColor;
50
    }
51
52
    /**
53
     * @param bool $hollowIsRising
54
     *
55
     * @return $this
56
     */
57
    public function setHollowIsRising($hollowIsRising)
58
    {
59
        $this->hollowIsRising = $hollowIsRising;
60
61
        return $this;
62
    }
63
}
64