Passed
Push — master ( 13b184...82bbaa )
by Alexander
07:06
created

HasValidationErrorMessage::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator;
6
7
trait HasValidationErrorMessage
8
{
9 3
    public function message(string $message): self
10
    {
11 3
        $new = clone $this;
12 3
        $new->message = $message;
0 ignored issues
show
Bug Best Practice introduced by
The property message does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
13 3
        return $new;
14
    }
15
}
16