Derivatives::getExchanges()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Codenixsv\CoinGeckoApi\Api;
6
7
use Exception;
8
9
class Derivatives extends Api
10
{
11
    /**
12
     * @param array $params
13
     * @return array
14
     * @throws Exception
15
     */
16 1
    public function getDerivatives(array $params = []): array
17
    {
18 1
        return $this->get('/derivatives', $params);
19
    }
20
21
    /**
22
     * @param array $params
23
     * @return array
24
     * @throws Exception
25
     */
26 1
    public function getExchanges(array $params = []): array
27
    {
28 1
        return $this->get('/derivatives/exchanges', $params);
29
    }
30
31
    /**
32
     * @param string $id
33
     * @param array $params
34
     * @return array
35
     * @throws Exception
36
     */
37 1
    public function getExchange(string $id, $params = []): array
38
    {
39 1
        return $this->get('/derivatives/exchanges/' . $id, $params);
40
    }
41
42
    /**
43
     * @return array
44
     * @throws Exception
45
     */
46 1
    public function getExchangeList(): array
47
    {
48 1
        return $this->get('/derivatives/exchanges/list');
49
    }
50
}
51