Passed
Branch master (fc5382)
by Fabian
03:13
created

Get   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace LE_ACME2\Response\Order;
4
5
use LE_ACME2\Connector\RawResponse;
6
use LE_ACME2\Exception;
7
8
class Get extends AbstractOrder {
9
10
    /**
11
     * Get constructor.
12
     *
13
     * @param RawResponse $raw
14
     * @param $orderURL
15
     * @throws Exception\InvalidResponse
16
     * @throws Exception\RateLimitReached
17
     */
18
    public function __construct(RawResponse $raw, string $orderURL) {
19
20
        // Dirty fix: Header of response "Get" does not contain an order url, instead of response "Create"
21
        // Is needed on production server, not on staging server - tested: 12.04.2021
22
        $raw->header[] = 'Location: ' . $orderURL;
23
24
        parent::__construct($raw);
25
    }
26
}