Volume::setTotal()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Date: 19.11.18
4
 * Time: 20:30
5
 */
6
7
namespace AlecRabbit\Structures;
8
9
class Volume
10
{
11
    /** @var float */
12
    public $total = 0;
13
    /** @var float */
14
    public $buy = 0;
15
    /** @var float */
16
    public $sell = 0;
17
18
    /**
19
     * @param float $total
20
     * @return Volume
21
     */
22
    public function setTotal(float $total): Volume
23
    {
24
        $this->total = $total;
25
        return $this;
26
    }
27
28
    /**
29
     * @param float $buy
30
     * @return Volume
31
     */
32
    public function setBuy(float $buy): Volume
33
    {
34
        $this->buy = $buy;
35
        return $this;
36
    }
37
38
    /**
39
     * @param float $sell
40
     * @return Volume
41
     */
42
    public function setSell(float $sell): Volume
43
    {
44
        $this->sell = $sell;
45
        return $this;
46
    }
47
}
48