| Total Complexity | 5 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class CountTransformer implements RruleTransformerInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @throws InvalidRruleException |
||
| 12 | */ |
||
| 13 | public function transform(array $values): int |
||
| 14 | { |
||
| 15 | 1 | $this->validate($values); |
|
| 16 | |||
| 17 | 1 | return (int) $values[0]; |
|
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @throws InvalidRruleException |
||
| 22 | */ |
||
| 23 | protected function validate(array $values): void |
||
| 27 | } |
||
| 28 | 1 | } |
|
| 30 |