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

HasValidationErrorMessage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A message() 0 5 1
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