GetNewNonce   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
dl 0
loc 15
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResponse() 0 8 1
1
<?php
2
3
namespace LE_ACME2\Request;
4
5
use LE_ACME2\Response;
6
7
use LE_ACME2\Connector;
8
use LE_ACME2\Cache;
9
use LE_ACME2\Exception;
10
11
class GetNewNonce extends AbstractRequest {
12
13
    /**
14
     * @throws Exception\InvalidResponse
15
     * @throws Exception\RateLimitReached
16
     * @throws Exception\ServiceUnavailable
17
     */
18
    public function getResponse() : Response\GetNewNonce {
19
20
        $result = Connector\Connector::getInstance()->request(
0 ignored issues
show
Bug introduced by
It seems like request() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        $result = Connector\Connector::getInstance()->/** @scrutinizer ignore-call */ request(
Loading history...
21
            Connector\Connector::METHOD_HEAD,
22
            Cache\DirectoryResponse::getInstance()->get()->getNewNonce()
0 ignored issues
show
Bug introduced by
It seems like get() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
            Cache\DirectoryResponse::getInstance()->/** @scrutinizer ignore-call */ get()->getNewNonce()
Loading history...
23
        );
24
25
        return new Response\GetNewNonce($result);
26
    }
27
}