| Total Complexity | 6 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class KunaClient |
||
| 15 | { |
||
| 16 | private const BASE_URI = 'https://kuna.io/api/v2'; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | private $publicKey; |
||
| 20 | /** @var string */ |
||
| 21 | private $secretKey; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * KunaClient constructor. |
||
| 25 | * @param string $publicKey |
||
| 26 | * @param string $secretKey |
||
| 27 | */ |
||
| 28 | |||
| 29 | 13 | public function __construct(string $publicKey = '', string $secretKey = '') |
|
| 33 | 13 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 6 | public function getPublicKey(): string |
|
| 39 | { |
||
| 40 | 6 | return $this->publicKey; |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | 6 | public function getSecretKey(): string |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 13 | public function getBaseUri(): string |
|
| 55 | { |
||
| 56 | 13 | return self::BASE_URI; |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return PrivateApi |
||
| 61 | */ |
||
| 62 | 1 | public function privateApi(): PrivateApi |
|
| 63 | { |
||
| 64 | 1 | return new PrivateApi($this); |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return PublicApi |
||
| 69 | */ |
||
| 70 | 1 | public function publicApi(): PublicApi |
|
| 73 | } |
||
| 74 | } |
||
| 75 |