GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

OrderTrade   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 120
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 21
dl 0
loc 120
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setAmount() 0 3 1
A setTotal() 0 3 1
A setFee() 0 3 1
A setTradeId() 0 3 1
A setGlobalTradeId() 0 3 1
A setRate() 0 3 1
1
<?php
2
/**
3
 * This file is part of Poloniex PHP SDK.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @copyright 2017-2018 Chasovskih Grisha <[email protected]>
9
 * @license https://github.com/signulls/poloniex-php-sdk/blob/master/LICENSE MIT
10
 */
11
12
namespace Poloniex\Response\TradingApi;
13
14
use Poloniex\Response\{AbstractResponse, Traits\DateTrait};
15
16
/**
17
 * Class OrderTrade
18
 *
19
 * @author Grisha Chasovskih <[email protected]>
20
 */
21
class OrderTrade extends AbstractResponse
22
{
23
    use DateTrait;
24
25
    public const TYPE_SELL = 'sell';
26
    public const TYPE_BUY = 'buy';
27
28
    public const TYPES = [
29
        self::TYPE_SELL,
30
        self::TYPE_BUY,
31
    ];
32
33
    /**
34
     * Example: 20825863
35
     *
36
     * @var int
37
     */
38
    public $globalTradeId;
39
40
    /**
41
     * Example: 147142
42
     *
43
     * @var int
44
     */
45
    public $tradeId;
46
47
    /**
48
     * Example: "BTC_XVC"
49
     *
50
     * @var string
51
     */
52
    public $currencyPair;
53
54
    /**
55
     * Example: "buy"
56
     *
57
     * @var string
58
     */
59
    public $type;
60
61
    /**
62
     * Example: "0.00018500"
63
     *
64
     * @var float
65
     */
66
    public $rate;
67
68
    /**
69
     * Example: "455.34206390"
70
     *
71
     * @var float
72
     */
73
    public $amount;
74
75
    /**
76
     * Example: "0.08423828"
77
     *
78
     * @var float
79
     */
80
    public $total;
81
82
    /**
83
     * Example: "0.00200000"
84
     *
85
     * @var float
86
     */
87
    public $fee;
88
89
    /**
90
     * @internal
91
     * @param int $globalTradeId
92
     */
93
    public function setGlobalTradeId(int $globalTradeId): void
94
    {
95
        $this->globalTradeId = $globalTradeId;
96
    }
97
98
    /**
99
     * @internal
100
     * @param int $tradeId
101
     */
102
    public function setTradeId(int $tradeId): void
103
    {
104
        $this->tradeId = $tradeId;
105
    }
106
107
    /**
108
     * @internal
109
     * @param float $rate
110
     */
111
    public function setRate(float $rate): void
112
    {
113
        $this->rate = $rate;
114
    }
115
116
    /**
117
     * @internal
118
     * @param float $amount
119
     */
120
    public function setAmount(float $amount): void
121
    {
122
        $this->amount = $amount;
123
    }
124
125
    /**
126
     * @internal
127
     * @param float $total
128
     */
129
    public function setTotal(float $total): void
130
    {
131
        $this->total = $total;
132
    }
133
134
    /**
135
     * @internal
136
     * @param float $fee
137
     */
138
    public function setFee(float $fee): void
139
    {
140
        $this->fee = $fee;
141
    }
142
}