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

StopOnErrorDto::validateA()   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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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