Test Failed
Push — required-aria-attribute ( 00f2fd )
by Dmitriy
03:11
created

ValidatorAwareTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 3
c 1
b 1
f 0
dl 0
loc 7
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Yiisoft\Form\HtmlOptions;
5
6
use Yiisoft\Validator\DataSetInterface;
7
use Yiisoft\Validator\Result;
8
use Yiisoft\Validator\ValidatorRuleInterface;
0 ignored issues
show
Bug introduced by
The type Yiisoft\Validator\ValidatorRuleInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
trait ValidatorAwareTrait
11
{
12
    private ValidatorRuleInterface $validator;
13
14
    public function validate($value, DataSetInterface $dataSet = null, bool $previousRulesErrored = false): Result
15
    {
16
        return $this->validator->validate($value, $dataSet, $previousRulesErrored);
17
    }
18
}
19