Exchanges   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 64
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getExchanges() 0 4 1
A getList() 0 4 1
A getExchange() 0 4 1
A getTickers() 0 4 1
A getStatusUpdates() 0 4 1
A getVolumeChart() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Codenixsv\CoinGeckoApi\Api;
6
7
use Exception;
8
9
class Exchanges extends Api
10
{
11
    /**
12
     * @param array $params
13
     * @return array
14
     * @throws Exception
15
     */
16 1
    public function getExchanges(array $params = []): array
17
    {
18 1
        return $this->get('/exchanges', $params);
19
    }
20
21
    /**
22
     * @return array
23
     * @throws Exception
24
     */
25 1
    public function getList(): array
26
    {
27 1
        return $this->get('/exchanges/list');
28
    }
29
30
    /**
31
     * @param string $id
32
     * @return array
33
     * @throws Exception
34
     */
35 1
    public function getExchange(string $id): array
36
    {
37 1
        return $this->get('/exchanges/' . $id);
38
    }
39
40
    /**
41
     * @param string $id
42
     * @param array $params
43
     * @return array
44
     * @throws Exception
45
     */
46 1
    public function getTickers(string $id, array $params = []): array
47
    {
48 1
        return $this->get('/exchanges/' . $id . '/tickers', $params);
49
    }
50
51
    /**
52
     * @param string $id
53
     * @param array $params
54
     * @return array
55
     * @throws Exception
56
     */
57 1
    public function getStatusUpdates(string $id, array $params = []): array
58
    {
59 1
        return $this->get('/exchanges/' . $id . '/status_updates', $params);
60
    }
61
62
    /**
63
     * @param string $id
64
     * @param string $days
65
     * @return array
66
     * @throws Exception
67
     */
68 1
    public function getVolumeChart(string $id, string $days): array
69
    {
70 1
        return $this->get('/exchanges/' . $id . '/volume_chart', ['days' => $days]);
71
    }
72
}
73