Total Complexity | 7 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 92.31% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class ToBeDefinedDataField extends PreprocessDataField |
||
13 | { |
||
14 | /** @param string[] $toBeDefinedTexts */ |
||
15 | 5 | public function __construct( |
|
16 | DataFieldInterface $nextDataField, |
||
17 | private readonly array $toBeDefinedTexts = ['Por definir'] |
||
18 | ) { |
||
19 | 5 | parent::__construct( |
|
20 | 5 | fn ($input) => $this->matchToBeDefined($input) ? '' : $input, |
|
21 | 5 | $nextDataField |
|
22 | 5 | ); |
|
23 | } |
||
24 | |||
25 | 2 | public function matchToBeDefined(mixed $input): bool |
|
38 | } |
||
39 | } |
||
40 |