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

Challenge::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 5
crap 2
1
<?php
2
3
namespace LE_ACME2\Response\Authorization\Struct;
4
5
class Challenge {
6
7
    // Status from RFC 8555 (7.1.6), version: March 2019
8
9
    const STATUS_PENDING = 'pending';
10
    const STATUS_PROGRESSING = 'processing';
11
    const STATUS_VALID = 'valid';
12
    const STATUS_INVALID = 'invalid';
13
14
    public $type;
15
    public $status;
16
    public $url;
17
    public $token;
18
    public $error;
19
20
    public function __construct(string $type, string $status, string $url, string $token, ChallengeError $error = null) {
21
22
        $this->type = $type;
23
        $this->status = $status;
24
        $this->url = $url;
25
        $this->token = $token;
26
        $this->error = $error;
27
    }
28
}