Passed
Pull Request — master (#11)
by Pol
07:45
created

RpTestResult::getImplementation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Facile\OpenIDClient\ConformanceTest\Runner;
6
7
use Throwable;
8
use Facile\OpenIDClient\ConformanceTest\RpTest\RpTestInterface;
9
use Facile\OpenIDClient\ConformanceTest\TestInfo;
10
11
class RpTestResult
12
{
13
    /** @var RpTestInterface */
14
    private $test;
15
16
    /** @var TestInfo */
17
    private $testInfo;
18
19
    /** @var string */
20
    private $implementation;
21
22
    /** @var Throwable */
23
    private $exception;
24
25
    /**
26
     * RpTestResult constructor.
27
     * @param RpTestInterface $test
28
     * @param TestInfo $testInfo
29
     * @param string $implementation
30
     * @param Throwable|null $exception
31
     */
32
    public function __construct(RpTestInterface $test, TestInfo $testInfo, string $implementation, ?Throwable $exception = null)
33
    {
34
        $this->test = $test;
35
        $this->testInfo = $testInfo;
36
        $this->implementation = $implementation;
37
        $this->exception = $exception;
38
    }
39
40
    /**
41
     * @return RpTestInterface
42
     */
43
    public function getTest(): RpTestInterface
44
    {
45
        return $this->test;
46
    }
47
48
    /**
49
     * @return TestInfo
50
     */
51
    public function getTestInfo(): TestInfo
52
    {
53
        return $this->testInfo;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getImplementation(): string
60
    {
61
        return $this->implementation;
62
    }
63
64
    /**
65
     * @return null|Throwable
66
     */
67
    public function getException(): ?Throwable
68
    {
69
        return $this->exception;
70
    }
71
72
    /**
73
     * @param Throwable $exception
74
     */
75
    public function setException(Throwable $exception): void
76
    {
77
        $this->exception = $exception;
78
    }
79
}
80