Test Failed
Push — master ( 57b7d4...e042c7 )
by Hannes
02:15
created

OutputOutcome   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getType() 0 3 1
A getContent() 0 3 1
A mustBeHandled() 0 3 1
A __tostring() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace hanneskod\readmetester\Runner;
6
7
/**
8
 * Output from an executed code block
9
 */
10
class OutputOutcome implements OutcomeInterface
11
{
12
    /**
13
     * @var string
14
     */
15
    private $output;
16
17
    public function __construct(string $output)
18
    {
19
        $this->output = $output;
20
    }
21
22
    public function getType(): string
23
    {
24
        return self::TYPE_OUTPUT;
25
    }
26
27
    public function mustBeHandled(): bool
28
    {
29
        return true;
30
    }
31
32
    public function getContent(): string
33
    {
34
        return $this->output;
35
    }
36
37
    public function __tostring(): string
38
    {
39
        return "output '{$this->output}'";
40
    }
41
}
42