Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Paystack |
||
8 | { |
||
9 | /** @var string The Paystack API key to be used for requests. */ |
||
10 | public static string $apiKey; |
||
11 | |||
12 | /** @var string The instance API key, settable once per new instance */ |
||
13 | private $instanceApiKey; |
||
|
|||
14 | |||
15 | /** @var string The base URL for the Paystack API. */ |
||
16 | public static $apiBase = 'https://api.paystack.co'; |
||
17 | |||
18 | /** |
||
19 | * @return string the API key used for requests |
||
20 | */ |
||
21 | public static function getApiKey(): string |
||
22 | { |
||
23 | return self::$apiKey; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Sets the API key to be used for requests. |
||
28 | * |
||
29 | * @param string $apiKey |
||
30 | */ |
||
31 | public static function setApiKey($apiKey): void |
||
35 | } |
||
36 | |||
37 | private static function validateApiKey($apiKey): bool |
||
46 |