Passed
Push — master ( 9b5a70...c1cb1a )
by Christophe
09:50 queued 07:13
created

Candlestick   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 30%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 43
ccs 3
cts 10
cp 0.3
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setHollowIsRising() 0 5 1
A getFallingColor() 0 3 1
A getRisingColor() 0 3 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 1
    public function __construct()
28
    {
29 1
        $this->fallingColor = new FallingColor();
30 1
        $this->risingColor = new RisingColor();
31
    }
32
33
    public function getFallingColor(): FallingColor
34
    {
35
        return $this->fallingColor;
36
    }
37
38
    public function getRisingColor(): RisingColor
39
    {
40
        return $this->risingColor;
41
    }
42
43
    /**
44
     * @return $this
45
     */
46
    public function setHollowIsRising(bool $hollowIsRising)
47
    {
48
        $this->hollowIsRising = $hollowIsRising;
49
50
        return $this;
51
    }
52
}
53