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

Challenge   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
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
}