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

Status::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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