Passed
Push — master ( 80a2af...b754d5 )
by Fabian
51s
created

TradeModel   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 189
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 189
ccs 38
cts 38
cp 1
rs 10
c 0
b 0
f 0
wmc 13

13 Methods

Rating   Name   Duplication   Size   Complexity  
A getMisc() 0 3 1
A getCost() 0 3 1
A getVol() 0 3 1
A getPrice() 0 3 1
A getClosing() 0 3 1
A getMargin() 0 3 1
A getOrdertype() 0 3 1
A getOrdertxid() 0 3 1
A getType() 0 3 1
A getPair() 0 3 1
A getFee() 0 3 1
A getTime() 0 3 1
B __construct() 0 26 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: fabia
5
 * Date: 27.08.2017
6
 * Time: 19:32
7
 */
8
9
namespace HanischIt\KrakenApi\Call\TradesHistory\Model;
10
11
/**
12
 * Class TradeModel
13
 * @package HanischIt\KrakenApi\Call\TradesHistory\Model
14
 */
15
class TradeModel
16
{
17
    /**
18
     * @var string
19
     */
20
    private $ordertxid;
21
    /**
22
     * @var string
23
     */
24
    private $pair;
25
    /**
26
     * @var int
27
     */
28
    private $time;
29
    /**
30
     * @var string
31
     */
32
    private $type;
33
    /**
34
     * @var string
35
     */
36
    private $ordertype;
37
    /**
38
     * @var float
39
     */
40
    private $price;
41
    /**
42
     * @var float
43
     */
44
    private $cost;
45
    /**
46
     * @var float
47
     */
48
    private $fee;
49
    /**
50
     * @var float
51
     */
52
    private $vol;
53
    /**
54
     * @var float
55
     */
56
    private $margin;
57
    /**
58
     * @var string
59
     */
60
    private $misc;
61
    /**
62
     * @var string
63
     */
64
    private $closing;
65
66
    /**
67
     * Trade constructor.
68
     * @param string $ordertxid
69
     * @param string $pair
70
     * @param int $time
71
     * @param string $type
72
     * @param string $ordertype
73
     * @param float $price
74
     * @param float $cost
75
     * @param float $fee
76
     * @param float $vol
77
     * @param float $margin
78
     * @param string $misc
79
     * @param string $closing
80
     */
81 2
    public function __construct(
82
        $ordertxid,
83
        $pair,
84
        $time,
85
        $type,
86
        $ordertype,
87
        $price,
88
        $cost,
89
        $fee,
90
        $vol,
91
        $margin,
92
        $misc,
93
        $closing
94
    ) {
95 2
        $this->ordertxid = $ordertxid;
96 2
        $this->pair = $pair;
97 2
        $this->time = $time;
98 2
        $this->type = $type;
99 2
        $this->ordertype = $ordertype;
100 2
        $this->price = $price;
101 2
        $this->cost = $cost;
102 2
        $this->fee = $fee;
103 2
        $this->vol = $vol;
104 2
        $this->margin = $margin;
105 2
        $this->misc = $misc;
106 2
        $this->closing = $closing;
107 2
    }
108
109
110
    /**
111
     * @return string
112
     */
113 2
    public function getOrdertxid()
114
    {
115 2
        return $this->ordertxid;
116
    }
117
118
    /**
119
     * @return string
120
     */
121 2
    public function getPair()
122
    {
123 2
        return $this->pair;
124
    }
125
126
    /**
127
     * @return int
128
     */
129 2
    public function getTime()
130
    {
131 2
        return $this->time;
132
    }
133
134
    /**
135
     * @return string
136
     */
137 2
    public function getType()
138
    {
139 2
        return $this->type;
140
    }
141
142
    /**
143
     * @return string
144
     */
145 2
    public function getOrdertype()
146
    {
147 2
        return $this->ordertype;
148
    }
149
150
    /**
151
     * @return float
152
     */
153 2
    public function getPrice()
154
    {
155 2
        return $this->price;
156
    }
157
158
    /**
159
     * @return float
160
     */
161 2
    public function getCost()
162
    {
163 2
        return $this->cost;
164
    }
165
166
    /**
167
     * @return float
168
     */
169 2
    public function getFee()
170
    {
171 2
        return $this->fee;
172
    }
173
174
    /**
175
     * @return float
176
     */
177 2
    public function getVol()
178
    {
179 2
        return $this->vol;
180
    }
181
182
    /**
183
     * @return float
184
     */
185 2
    public function getMargin()
186
    {
187 2
        return $this->margin;
188
    }
189
190
    /**
191
     * @return string
192
     */
193 2
    public function getMisc()
194
    {
195 2
        return $this->misc;
196
    }
197
198
    /**
199
     * @return string
200
     */
201 2
    public function getClosing()
202
    {
203 2
        return $this->closing;
204
    }
205
}
206