Nonce::getNew()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Rogierw\RwAcme\Endpoints;
4
5
class Nonce extends Endpoint
6
{
7
    public function getNew(): string
8
    {
9
        $response = $this->client
10
            ->getHttpClient()
11
            ->head($this->client->directory()->newNonce());
12
13
        return trim($response->getHeader('replay-nonce'));
14
    }
15
}
16