Total Complexity | 9 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 81.25% |
Changes | 0 |
1 | <?php |
||
16 | class MatchRegularExpression extends Rule |
||
17 | { |
||
18 | /** |
||
19 | * @var string the regular expression to be matched with |
||
20 | */ |
||
21 | private string $pattern; |
||
22 | /** |
||
23 | * @var bool whether to invert the validation logic. Defaults to false. If set to true, |
||
24 | * the regular expression defined via [[pattern]] should NOT match the attribute value. |
||
25 | */ |
||
26 | private bool $not = false; |
||
27 | |||
28 | private string $message = 'Value is invalid.'; |
||
29 | |||
30 | 1 | public function __construct(string $pattern) |
|
31 | { |
||
32 | 1 | $this->pattern = $pattern; |
|
33 | } |
||
34 | |||
35 | 1 | public function not(): self |
|
39 | } |
||
40 | |||
41 | public function message(string $message): self |
||
45 | } |
||
46 | |||
47 | 1 | protected function validateValue($value, DataSetInterface $dataSet = null): Result |
|
62 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths