Completed
Push — master ( 9a7b87...ad20a3 )
by Alessandro
03:07
created

TestResultWithMessage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 33
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getFunctionName() 0 4 1
A getFailureMessage() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Paraunit\TestResult;
5
6
use Paraunit\TestResult\Interfaces\FailureMessageInterface;
7
use Paraunit\TestResult\Interfaces\FunctionNameInterface;
8
use Paraunit\TestResult\Interfaces\PrintableTestResultInterface;
9
10
/**
11
 * Class TestResultWithMessage
12
 * @package Paraunit\TestResult
13
 */
14
class TestResultWithMessage extends MuteTestResult implements
15
    PrintableTestResultInterface,
16
    FunctionNameInterface,
17
    FailureMessageInterface
18
{
19
    /** @var string */
20
    private $functionName;
21
22
    /** @var string */
23
    private $failureMessage;
24
25
    /**
26
     * TestResultWithMessage constructor.
27
     * @param string $functionName
28
     * @param string $failureMessage
29
     */
30
    public function __construct(string $functionName, string $failureMessage)
31
    {
32
        parent::__construct();
33
        $this->functionName = $functionName;
34
        $this->failureMessage = $failureMessage;
35
    }
36
37
    public function getFunctionName(): string
38
    {
39
        return $this->functionName;
40
    }
41
42
    public function getFailureMessage(): string
43
    {
44
        return $this->failureMessage;
45
    }
46
}
47