Passed
Push — master ( 3d4557...4c2a8d )
by Hannes
01:54
created

TestEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStatus() 0 3 1
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace hanneskod\readmetester\Event;
6
7
use hanneskod\readmetester\Expectation\StatusInterface;
8
9
abstract class TestEvent extends BaseEvent
10
{
11
    private StatusInterface $status;
12
13
    public function __construct(StatusInterface $status)
14
    {
15
        parent::__construct(
16
            "[{$status->getOutcome()->getExample()->getName()->getFullName()}] {$status->getContent()}"
17
        );
18
19
        $this->status = $status;
20
    }
21
22
    public function getStatus(): StatusInterface
23
    {
24
        return $this->status;
25
    }
26
}
27