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.

LandingHistory::setId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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;
15
use DateTime;
16
17
/**
18
 * Class LandingHistory
19
 *
20
 * @author Grisha Chasovskih <[email protected]>
21
 */
22
class LandingHistory extends AbstractResponse
23
{
24
    /**
25
     * Example: 175589553
26
     *
27
     * @var int
28
     */
29
    public $id;
30
31
    /**
32
     * Example: "BTC"
33
     *
34
     * @var string
35
     */
36
    public $currency;
37
38
    /**
39
     * Example: 0.00057400
40
     *
41
     * @var float
42
     */
43
    public $rate;
44
45
    /**
46
     * Example: 0.04374404
47
     *
48
     * @var float
49
     */
50
    public $amount;
51
52
    /**
53
     * Example: 0.47610000
54
     *
55
     * @var float
56
     */
57
    public $duration;
58
59
    /**
60
     * Example: 0.00001196
61
     *
62
     * @var float
63
     */
64
    public $interest;
65
66
    /**
67
     * Example: -0.00000179
68
     *
69
     * @var float
70
     */
71
    public $fee;
72
73
    /**
74
     * Example: 0.00001017
75
     *
76
     * @var float
77
     */
78
    public $earned;
79
80
    /**
81
     * Example: 2016-09-28 06:47:26
82
     *
83
     * @var string
84
     */
85
    public $open;
86
87
    /**
88
     * Example: 2016-09-28 18:13:03
89
     *
90
     * @var string
91
     */
92
    public $close;
93
94
    /**
95
     * @internal
96
     * @param string|null $format
97
     * @return string
98
     */
99
    public function getOpen(string $format = null): string
100
    {
101
        return $format
102
            ? DateTime::createFromFormat(self::DATE_FORMAT, $this->open)->format($format)
103
            : $this->open;
104
    }
105
106
    /**
107
     * @param string $format
108
     * @return string
109
     */
110
    public function getClose(string $format = null): string
111
    {
112
        return $format
113
            ? DateTime::createFromFormat(self::DATE_FORMAT, $this->close)->format($format)
114
            : $this->close;
115
    }
116
117
    /**
118
     * @internal
119
     * @param int $id
120
     */
121
    public function setId(int $id): void
122
    {
123
        $this->id = $id;
124
    }
125
126
    /**
127
     * @internal
128
     * @param string $currency
129
     */
130
    public function setCurrency(string $currency): void
131
    {
132
        $this->currency = $currency;
133
    }
134
135
    /**
136
     * @internal
137
     * @param float $rate
138
     */
139
    public function setRate(float $rate): void
140
    {
141
        $this->rate = $rate;
142
    }
143
144
    /**
145
     * @internal
146
     * @param float $amount
147
     */
148
    public function setAmount(float $amount): void
149
    {
150
        $this->amount = $amount;
151
    }
152
153
    /**
154
     * @internal
155
     * @param float $duration
156
     */
157
    public function setDuration(float $duration): void
158
    {
159
        $this->duration = $duration;
160
    }
161
162
    /**
163
     * @internal
164
     * @param float $interest
165
     */
166
    public function setInterest(float $interest): void
167
    {
168
        $this->interest = $interest;
169
    }
170
171
    /**
172
     * @internal
173
     * @param float $fee
174
     */
175
    public function setFee(float $fee): void
176
    {
177
        $this->fee = $fee;
178
    }
179
180
    /**
181
     * @internal
182
     * @param float $earned
183
     */
184
    public function setEarned(float $earned): void
185
    {
186
        $this->earned = $earned;
187
    }
188
}