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