Passed
Push — master ( 7077b7...c50ccd )
by Alec
02:59
created

Volume::setBuy()   A

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
 * User: alec
4
 * Date: 19.11.18
5
 * Time: 20:30
6
 */
7
8
namespace AlecRabbit\Structures;
9
10
class Volume
11
{
12
    /** @var float */
13
    public $total = 0;
14
    /** @var float */
15
    public $buy = 0;
16
    /** @var float */
17
    public $sell = 0;
18
19
    /**
20
     * @param float $total
21
     * @return Volume
22
     */
23
    public function setTotal(float $total): Volume
24
    {
25
        $this->total = $total;
26
        return $this;
27
    }
28
29
    /**
30
     * @param float $buy
31
     * @return Volume
32
     */
33
    public function setBuy(float $buy): Volume
34
    {
35
        $this->buy = $buy;
36
        return $this;
37
    }
38
39
    /**
40
     * @param float $sell
41
     * @return Volume
42
     */
43
    public function setSell(float $sell): Volume
44
    {
45
        $this->sell = $sell;
46
        return $this;
47
    }
48
}
49