Passed
Push — master ( ce7b1b...4d0c94 )
by
unknown
03:04
created

StopOnErrorDto   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validateA() 0 3 1
A validateB() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Tests\TestEnvironments\Support\Data;
6
7
use Yiisoft\Validator\Result;
8
use Yiisoft\Validator\Rule\Callback;
9
use Yiisoft\Validator\Rule\StopOnError;
10
11
#[StopOnError([
12
    new Callback(method: 'validateA'),
13
    new Callback(method: 'validateB'),
14
])]
15
final class StopOnErrorDto
16
{
17
    private function validateA(): Result
0 ignored issues
show
Unused Code introduced by
The method validateA() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
18
    {
19
        return (new Result())->addError('error A');
20
    }
21
22
    private function validateB(): Result
0 ignored issues
show
Unused Code introduced by
The method validateB() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
23
    {
24
        return (new Result())->addError('error B');
25
    }
26
}
27