PlaceOrder   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getEndpointRequestMethod() 0 3 1
A getRequestClassname() 0 3 1
A getResponseClassnameByCondition() 0 3 1
A getEndpointUrl() 0 3 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Spot\Trade\PlaceOrder;
4
5
use Carpenstar\ByBitAPI\Core\Endpoints\PrivateEndpoint;
6
use Carpenstar\ByBitAPI\Core\Enums\EnumHttpMethods;
7
use Carpenstar\ByBitAPI\Spot\Trade\PlaceOrder\Response\PlaceOrderResponse;
8
use Carpenstar\ByBitAPI\Spot\Trade\PlaceOrder\Request\PlaceOrderRequest;
9
10
/**
11
 * https://bybit-exchange.github.io/docs/spot/trade/place-order
12
 */
13
class PlaceOrder extends PrivateEndpoint
14
{
15
    public function getEndpointRequestMethod(): string
16
    {
17
        return EnumHttpMethods::POST;
18
    }
19
20
    protected function getEndpointUrl(): string
21
    {
22
        return "/spot/v3/private/order";
23
    }
24
25
    protected function getResponseClassnameByCondition(array &$apiData = null): string
26
    {
27
        return PlaceOrderResponse::class;
28
    }
29
30
    protected function getRequestClassname(): string
31
    {
32
        return PlaceOrderRequest::class;
33
    }
34
}
35