Completed
Pull Request — master (#37)
by Alessandro
02:23
created

MuteTestResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 3
c 4
b 0
f 0
lcom 0
cbo 2
dl 0
loc 29
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setTestResultFormat() 0 4 1
A getTestResultFormat() 0 4 1
1
<?php
2
3
namespace Paraunit\TestResult;
4
use Paraunit\TestResult\Interfaces\PrintableTestResultInterface;
5
6
/**
7
 * Class MuteTestResult
8
 * @package Paraunit\Output\MuteTestResult
9
 */
10
class MuteTestResult extends NullTestResult implements PrintableTestResultInterface
11
{
12
    /** @var  TestResultFormat */
13
    private $testResultFormat;
14
15
    /**
16
     * AbstractTestResult constructor.
17
     */
18 11
    public function __construct()
19
    {
20 11
        $this->testResultFormat = new TestResultFormat('?', 'null', '');
21 11
    }
22
23
    /**
24
     * @param TestResultFormat $testResultFormat
25
     */
26 30
    public function setTestResultFormat(TestResultFormat $testResultFormat)
27
    {
28 30
        $this->testResultFormat = $testResultFormat;
29 30
    }
30
31
    /**
32
     * @return TestResultFormat
33
     */
34 24
    public function getTestResultFormat()
35
    {
36 24
        return $this->testResultFormat;
37
    }
38
}
39