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

Candlestick::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
nc 1
cc 1
nop 0
crap 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