Completed
Push — master ( 0e338e...cdc67b )
by Alessandro
09:41 queued 04:45
created

FullTestResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

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