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