Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | abstract class Endpoint |
||
10 | { |
||
11 | public function __construct(protected Api $client) |
||
13 | } |
||
14 | |||
15 | protected function createKeyId(string $accountUrl, string $url, ?array $payload = null): array |
||
16 | { |
||
17 | return KeyId::generate( |
||
18 | $this->client->localAccount()->getPrivateKey(), |
||
19 | $accountUrl, |
||
20 | $url, |
||
21 | $this->client->nonce()->getNew(), |
||
22 | $payload |
||
23 | ); |
||
24 | } |
||
25 | |||
26 | protected function getAccountPrivateKey(): string |
||
29 | } |
||
30 | |||
31 | protected function logResponse(string $level, string $message, Response $response, array $additionalContext = []): void |
||
39 | } |
||
40 | } |
||
41 |