TestResult::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace HtaccessCapabilityTester;
4
5
/**
6
 * Class for holding properties of a TestResult
7
 *
8
 * @package    HtaccessCapabilityTester
9
 * @author     Bjørn Rosell <[email protected]>
10
 * @since      Class available since the beginning
11
 */
12
class TestResult
13
{
14
15
    /* @var bool|null   The result, null if inconclusive */
16
    public $status;
17
18
    /* @var string   Information about how the test failed / became inconclusive */
19
    public $info;
20
21
    /* @var string   Status code of last request in the test */
22
    public $statusCodeOfLastRequest;
23
24
    /**
25
     * Constructor.
26
     *
27
     * @param  bool|null  $status
28
     * @param  string     $info
29
     * @param  string     $statusCodeOfLastRequest  (optional)
30
     *
31
     * @return void
32
     */
33 80
    public function __construct($status, $info, $statusCodeOfLastRequest = null)
34
    {
35 80
        $this->status = $status;
36 80
        $this->info = $info;
37 80
        $this->statusCodeOfLastRequest = $statusCodeOfLastRequest;
38 80
    }
39
}
40