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

OutputOutcome   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 5
1
<?php
2
3
// phpcs:disable Squiz.WhiteSpace.ScopeClosingBrace
4
5
declare(strict_types=1);
6
7
namespace hanneskod\readmetester\Runner;
8
9
use hanneskod\readmetester\Example\ExampleObj;
10
11
final class OutputOutcome implements OutcomeInterface
12
{
13
    use OutcomeDefaultsTrait;
14
15
    public function __construct(
16
        private ExampleObj $example,
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_PRIVATE, expecting T_VARIABLE on line 16 at column 8
Loading history...
17
        private string $content,
18
    ) {}
19
20
    public function isOutput(): bool
21
    {
22
        return true;
23
    }
24
25
    public function mustBeHandled(): bool
26
    {
27
        return true;
28
    }
29
30
    public function getContent(): string
31
    {
32
        return $this->content;
33
    }
34
35
    public function getDescription(): string
36
    {
37
        return "output '{$this->getContent()}'";
38
    }
39
}
40