Passed
Push — master ( 25257e...5200e3 )
by Alec
04:00
created

Trade   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 29
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 1
1
<?php
2
/**
3
 * User: alec
4
 * Date: 19.11.18
5
 * Time: 14:55
6
 */
7
8
namespace AlecRabbit\Structures;
9
10
class Trade
11
{
12
    /** @var int */
13
    public $id;
14
    /** @var int */
15
    public $side;
16
    /** @var string */
17
    public $pair;
18
    /** @var float */
19
    public $amount;
20
    /** @var float */
21
    public $price;
22
    /** @var int|null */
23
    public $timestamp;
24
25 30
    public function __construct(
26
        int $side,
27
        string $pair,
28
        float $price,
29
        float $amount,
30
        ?int $timestamp = null,
31
        int $id = 0
32
    ) {
33 30
        $this->side = $side;
34 30
        $this->pair = $pair;
35 30
        $this->amount = $amount;
36 30
        $this->price = $price;
37 30
        $this->timestamp = $timestamp;
38 30
        $this->id = $id;
39 30
    }
40
}
41