| Total Complexity | 7 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class OrderBookRequest extends AbstractParameters |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var string $category |
||
| 10 | */ |
||
| 11 | protected string $category = "linear"; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var string $symbol |
||
| 15 | */ |
||
| 16 | protected string $symbol; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var int $limit |
||
| 20 | */ |
||
| 21 | protected int $limit = 25; |
||
| 22 | |||
| 23 | public function __construct() |
||
| 24 | { |
||
| 25 | $this->setRequiredField("symbol"); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $category |
||
| 30 | * @return OrderBookRequest |
||
| 31 | */ |
||
| 32 | public function setCategory(string $category): self |
||
|
|
|||
| 33 | { |
||
| 34 | $this->category = "linear"; // only linear support, now |
||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function getCategory(): string |
||
| 42 | { |
||
| 43 | return $this->category; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $symbol |
||
| 48 | * @return OrderBookRequest |
||
| 49 | */ |
||
| 50 | public function setSymbol(string $symbol): self |
||
| 51 | { |
||
| 52 | $this->symbol = $symbol; |
||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getSymbol(): string |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param int $limit |
||
| 66 | * @return OrderBookRequest |
||
| 67 | */ |
||
| 68 | public function setLimit(int $limit): self |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | public function getLimit(): int |
||
| 80 | } |
||
| 81 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.