Total Complexity | 7 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Directory extends Endpoint |
||
9 | { |
||
10 | public function all(): Response |
||
11 | { |
||
12 | $response = $this->client |
||
13 | ->getHttpClient() |
||
14 | ->get($this->client->getBaseUrl() . '/directory'); |
||
15 | |||
16 | if ($response->getHttpResponseCode() >= 400) { |
||
17 | $this->logResponse('error', 'Cannot get directory', $response); |
||
18 | |||
19 | throw new LetsEncryptClientException('Cannot get directory'); |
||
20 | } |
||
21 | |||
22 | return $response; |
||
23 | } |
||
24 | |||
25 | public function newNonce(): string |
||
26 | { |
||
27 | return $this->all()->getBody()['newNonce']; |
||
28 | } |
||
29 | |||
30 | public function newAccount(): string |
||
33 | } |
||
34 | |||
35 | public function newOrder(): string |
||
38 | } |
||
39 | |||
40 | public function getOrder(): string |
||
45 | } |
||
46 | |||
47 | public function revoke(): string |
||
52 |