| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class PreprocessDataField implements DataFieldInterface |
||
| 8 | { |
||
| 9 | /** @var callable(scalar):scalar */ |
||
| 10 | private $preprocessFunction; |
||
| 11 | |||
| 12 | private DataFieldInterface $nextDataField; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param callable(scalar):scalar $preprocessFunction |
||
| 16 | */ |
||
| 17 | 5 | public function __construct(callable $preprocessFunction, DataFieldInterface $nextDataField) |
|
| 18 | { |
||
| 19 | 5 | $this->preprocessFunction = $preprocessFunction; |
|
| 20 | 5 | $this->nextDataField = $nextDataField; |
|
| 21 | } |
||
| 22 | |||
| 23 | 4 | public function name(): string |
|
| 24 | { |
||
| 25 | 4 | return $this->nextDataField->name(); |
|
| 26 | } |
||
| 27 | |||
| 28 | 2 | public function transform($input) |
|
| 32 | } |
||
| 33 | |||
| 34 | 4 | public function getNextDataField(): DataFieldInterface |
|
| 37 | } |
||
| 38 | } |
||
| 39 |