Test Failed
Pull Request — master (#3)
by Vladislav
20:43 queued 12:42
created

KlineRequestOptions   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 132
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 24
dl 0
loc 132
rs 10
c 0
b 0
f 0
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A setSymbol() 0 4 1
A getInterval() 0 3 1
A getLimit() 0 3 1
A getStartTime() 0 3 1
A setInterval() 0 4 1
A __construct() 0 5 1
A setStartTime() 0 4 1
A setLimit() 0 4 1
A getEndTime() 0 3 1
A getSymbol() 0 3 1
A setEndTime() 0 4 1
1
<?php
2
namespace Carpenstar\ByBitAPI\Spot\MarketData\Kline\Options;
3
4
use Carpenstar\ByBitAPI\Core\Enums\IntervalEnum;
0 ignored issues
show
Bug introduced by
The type Carpenstar\ByBitAPI\Core\Enums\IntervalEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
5
use Carpenstar\ByBitAPI\Core\Objects\OptionsEntity;
0 ignored issues
show
Bug introduced by
The type Carpenstar\ByBitAPI\Core\Objects\OptionsEntity was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class KlineRequestOptions extends OptionsEntity
8
{
9
    /**
10
     * Name of the trading pair
11
     * @required true
12
     * @var string $symbol
13
     */
14
    protected string $symbol;
15
16
    /**
17
     * Chart interval. See list intervals in
18
     * @required true
19
     * @var string $interval
20
     */
21
    protected string $interval = IntervalEnum::MINUTE1;
22
23
    /**
24
     * Limit for data size. [1, 1000]. Default: 1000
25
     * @required false
26
     * @var int $limit
27
     */
28
    protected int $limit = 1000;
29
30
    /**
31
     * Start time (ms)
32
     * @required false
33
     * @var int $startTime
34
     */
35
    protected int $startTime;
36
37
    /**
38
     * End time (ms)
39
     * @required false
40
     * @var int $endTime
41
     */
42
    protected int $endTime;
43
44
    public function __construct()
45
    {
46
        $this
47
            ->setRequiredField('symbol')
48
            ->setRequiredField('interval');
49
    }
50
51
    /**
52
     * @param string $symbol
53
     * @return KlineRequestEntity
0 ignored issues
show
Bug introduced by
The type Carpenstar\ByBitAPI\Spot...ions\KlineRequestEntity was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
54
     */
55
    public function setSymbol(string $symbol): self
56
    {
57
        $this->symbol = $symbol;
58
        return $this;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getSymbol(): string
65
    {
66
        return $this->symbol;
67
    }
68
69
    /**
70
     * @param int $limit
71
     * @return KlineRequestEntity
72
     */
73
    public function setLimit(int $limit): self
74
    {
75
        $this->limit = $limit;
76
        return $this;
77
    }
78
79
    /**
80
     * @return int
81
     */
82
    public function getLimit(): int
83
    {
84
        return $this->limit;
85
    }
86
87
    /**
88
     * @param string $interval
89
     * @return KlineRequestEntity
90
     */
91
    public function setInterval(string $interval): self
92
    {
93
        $this->interval = $interval;
94
        return $this;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getInterval(): string
101
    {
102
        return $this->interval;
103
    }
104
105
    /**
106
     * @param int $startTime
107
     * @return KlineRequestEntity
108
     */
109
    public function setStartTime(int $startTime): self
110
    {
111
        $this->startTime = $startTime;
112
        return $this;
113
    }
114
115
    /**
116
     * @return int
117
     */
118
    public function getStartTime(): int
119
    {
120
        return $this->startTime;
121
    }
122
123
    /**
124
     * @param int $endTime
125
     * @return KlineRequestEntity
126
     */
127
    public function setEndTime(int $endTime): self
128
    {
129
        $this->endTime = $endTime;
130
        return $this;
131
    }
132
133
    /**
134
     * @return int
135
     */
136
    public function getEndTime(): int
137
    {
138
        return $this->endTime;
139
    }
140
}