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

Get::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 10
c 4
b 0
f 0
cc 1
nc 1
nop 2
crap 2
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
}