Failure   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
ccs 7
cts 7
cp 1
wmc 3
lcom 1
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isValid() 0 4 1
A getMessage() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace byrokrat\banking\Validator;
6
7
/**
8
 * A failed validation attempt
9
 */
10
class Failure implements ResultInterface
11
{
12
    /**
13
     * @var string
14
     */
15
    private $message;
16
17 161
    public function __construct(string $message)
18
    {
19 161
        $this->message = $message;
20 161
    }
21
22 142
    public function isValid(): bool
23
    {
24 142
        return false;
25
    }
26
27 139
    public function getMessage(): string
28
    {
29 139
        return '[FAIL] ' . $this->message;
30
    }
31
}
32