Test Failed
Pull Request — master (#3)
by Vladislav
02:16
created

OrderBookRequestOptions   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 10
dl 0
loc 55
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getLimit() 0 3 1
A getSymbol() 0 3 1
A __construct() 0 3 1
A setLimit() 0 4 1
A setSymbol() 0 4 1
1
<?php
2
namespace Carpenstar\ByBitAPI\Spot\MarketData\OrderBook\Request;
3
4
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...
5
6
class OrderBookRequestOptions extends OptionsEntity
7
{
8
    /**
9
     * Symbol
10
     * @required true
11
     * @var string $symbol
12
     */
13
    protected string $symbol;
14
15
    /**
16
     * Limit for data size. [1, 200]. Default: 100
17
     * @required false
18
     * @var int $limit
19
     */
20
    protected int $limit = 100;
21
22
    public function __construct()
23
    {
24
        $this->setRequiredField('symbol');
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getSymbol(): string
31
    {
32
        return $this->symbol;
33
    }
34
35
    /**
36
     * @param string $symbol
37
     * @return $this
38
     */
39
    public function setSymbol(string $symbol): self
40
    {
41
        $this->symbol = $symbol;
42
        return $this;
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getLimit(): int
49
    {
50
        return $this->limit;
51
    }
52
53
    /**
54
     * @param int $limit
55
     * @return $this
56
     */
57
    public function setLimit(int $limit): self
58
    {
59
        $this->limit = $limit;
60
        return $this;
61
    }
62
}