Test Failed
Push — master ( 397588...614ce5 )
by Hannes
02:13
created

Status   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __tostring() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace hanneskod\readmetester\Expectation;
6
7
/**
8
 * Represents the result of an evaluated expectation
9
 */
10
abstract class Status
11
{
12
    /**
13
     * @var string
14
     */
15
    private $desc;
16
17
    public function __construct(string $desc)
18
    {
19
        $this->desc = $desc;
20
    }
21
22
    /**
23
     * Get a description of the represented status
24
     */
25
    public function __tostring(): string
26
    {
27
        return $this->desc;
28
    }
29
30
    /**
31
     * Check if expectation validation was a success
32
     */
33
    abstract public function isSuccess(): bool;
34
}
35