Passed
Pull Request — master (#47)
by
unknown
11:29
created

ErrorOutcome   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A mustBeHandled() 0 3 1
A getContent() 0 3 1
A isError() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace hanneskod\readmetester\Runner;
6
7
use hanneskod\readmetester\Example\ExampleObj;
8
9
final class ErrorOutcome implements OutcomeInterface
10
{
11
    use OutcomeDefaultsTrait;
12
13
    public function __construct(
14
        private ExampleObj $example,
15
        private string $content,
16
    ) {}
17
18
    public function isError(): bool
19
    {
20
        return true;
21
    }
22
23
    public function mustBeHandled(): bool
24
    {
25
        return true;
26
    }
27
28
    public function getContent(): string
29
    {
30
        return $this->content;
31
    }
32
33
    public function getDescription(): string
34
    {
35
        return $this->getContent();
36
    }
37
}
38