Test Failed
Pull Request — master (#13)
by Vladislav
09:26 queued 01:13
created

BatchCancelOrderByIdResponseItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 34
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getCode() 0 3 1
A getOrderId() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrderById\Response;
4
5
use Carpenstar\ByBitAPI\Core\Objects\AbstractResponse;
6
use Carpenstar\ByBitAPI\Spot\Trade\BatchCancelOrderById\Interfaces\IBatchCancelOrderByIdResponseItemInterface;
7
8
class BatchCancelOrderByIdResponseItem extends AbstractResponse implements IBatchCancelOrderByIdResponseItemInterface
9
{
10
    /**
11
     * Order ID
12
     * @var int $orderId
13
     */
14
    private int $orderId;
15
16
    /**
17
     * Error code
18
     * @var string $code;
19
     */
20
    private string $code;
21
22
    public function __construct(array $data)
23
    {
24
        $this->orderId = $data['orderId'];
25
        $this->code = $data['code'];
26
    }
27
28
    /**
29
     * @return int
30
     */
31
    public function getOrderId(): int
32
    {
33
        return $this->orderId;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getCode(): string
40
    {
41
        return $this->code;
42
    }
43
}