TestResultFormat   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 49
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getTag() 0 4 1
A getTitle() 0 4 1
A shouldPrintTestOutput() 0 4 1
A shouldPrintFilesRecap() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Paraunit\TestResult;
6
7
/**
8
 * Class TestResultContainer
9
 * @package Paraunit\TestResult
10
 */
11
class TestResultFormat
12
{
13
    /** @var string */
14
    private $tag;
15
16
    /** @var string */
17
    private $title;
18
19
    /** @var bool */
20
    private $printTestOutput;
21
22
    /** @var bool */
23
    private $printFilesRecap;
24
25
    /**
26
     * TestResultFormat constructor.
27
     * @param string $tag
28
     * @param string $title
29
     * @param bool $printTestOutput
30
     * @param bool $printFilesRecap
31
     */
32 84
    public function __construct(string $tag, string $title, bool $printTestOutput = true, bool $printFilesRecap = true)
33
    {
34 84
        $this->tag = $tag;
35 84
        $this->title = $title;
36 84
        $this->printTestOutput = $printTestOutput;
37 84
        $this->printFilesRecap = $printFilesRecap;
38
    }
39
40 50
    public function getTag(): string
41
    {
42 50
        return $this->tag;
43
    }
44
45 18
    public function getTitle(): string
46
    {
47 18
        return $this->title;
48
    }
49
50 25
    public function shouldPrintTestOutput(): bool
51
    {
52 25
        return $this->printTestOutput;
53
    }
54
55 25
    public function shouldPrintFilesRecap(): bool
56
    {
57 25
        return $this->printFilesRecap;
58
    }
59
}
60