Cancel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 53
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 4 1
A getMethod() 0 4 1
A getData() 0 7 1
A mapResponse() 0 4 1
1
<?php
2
3
namespace CryptoMarkets\Binance\Endpoints;
4
5
class Cancel extends Endpoint
6
{
7
    /**
8
     * Determine if the request need authorized.
9
     *
10
     * @var bool
11
     */
12
    protected $authorize = true;
13
14
    /**
15
     * Get the request url.
16
     *
17
     * @return string
18
     */
19
    public function getUrl()
20
    {
21
        return parent::getUrl().'v3/order';
22
    }
23
24
    /**
25
     * Get the request method.
26
     *
27
     * @return string
28
     */
29
    public function getMethod()
30
    {
31
        return 'DELETE';
32
    }
33
34
    /**
35
     * Get the request data.
36
     *
37
     * @return array
38
     */
39
    public function getData()
40
    {
41
        return [
42
            'symbol' => $this->params['symbol'],
43
            'orderId' => $this->params['id'],
44
        ];
45
    }
46
47
    /**
48
     * Map the given array to create a response object.
49
     *
50
     * @param  array  $data
51
     * @return array
52
     */
53
    public function mapResponse(array $data = [])
54
    {
55
        return Status::make($this->httpClient, $this->params)->send();
0 ignored issues
show
Bug introduced by
The method make() does not seem to exist on object<CryptoMarkets\Binance\Endpoints\Status>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
56
    }
57
}
58