Test Failed
Push — master ( 912b2a...b3ee71 )
by Vladislav
25:05 queued 22:30
created

PurchaseRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Spot\LeverageToken\Purchase\Request;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
6
use Carpenstar\ByBitAPI\Spot\LeverageToken\Purchase\Interfaces\IPurchaseRequestInterface;
7
use Carpenstar\ByBitAPI\Spot\LeverageToken\Purchase\Purchase;
8
9
class PurchaseRequest extends AbstractParameters implements IPurchaseRequestInterface
10
{
11
    /**
12
     * Abbreviation of the LT.
13
     * @var string $ltCode
14
     */
15
    protected string $ltCode;
16
17
    /**
18
     * Purchase amount
19
     * @var float $ltAmount
20
     */
21
    protected float $ltAmount;
22
23
    /**
24
     * Serial number. A kind of unique customised ID
25
     * @var string $serialNo
26
     */
27
    protected string $serialNo;
28
29
    /**
30
     * @return string
31
     */
32
    public function getLtCode(): string
33
    {
34
        return $this->ltCode;
35
    }
36
37
    /**
38
     * @param string $ltCode
39
     * @return Purchase
40
     */
41
    public function setLtCode(string $ltCode): self
42
    {
43
        $this->ltCode = $ltCode;
44
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type Carpenstar\ByBitAPI\Spot...Request\PurchaseRequest which is incompatible with the documented return type Carpenstar\ByBitAPI\Spot...Token\Purchase\Purchase.
Loading history...
45
    }
46
47
    /**
48
     * @return float
49
     */
50
    public function getLtAmount(): float
51
    {
52
        return $this->ltAmount;
53
    }
54
55
    /**
56
     * @param float $ltAmount
57
     * @return Purchase
58
     */
59
    public function setLtAmount(float $ltAmount): self
60
    {
61
        $this->ltAmount = $ltAmount;
62
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type Carpenstar\ByBitAPI\Spot...Request\PurchaseRequest which is incompatible with the documented return type Carpenstar\ByBitAPI\Spot...Token\Purchase\Purchase.
Loading history...
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getSerialNo(): string
69
    {
70
        return $this->serialNo;
71
    }
72
73
    /**
74
     * @param string $serialNo
75
     * @return Purchase
76
     */
77
    public function setSerialNo(string $serialNo): self
78
    {
79
        $this->serialNo = $serialNo;
80
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type Carpenstar\ByBitAPI\Spot...Request\PurchaseRequest which is incompatible with the documented return type Carpenstar\ByBitAPI\Spot...Token\Purchase\Purchase.
Loading history...
81
    }
82
}
83