Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class ValidatorCollection extends AbstractCollection implements CollectionInterface |
||
14 | { |
||
15 | /** |
||
16 | * @param ValidatorInterface $validator Pass in a validator |
||
17 | * @return $this |
||
18 | */ |
||
19 | 26 | public function append($validator) |
|
20 | { |
||
21 | 26 | if (!$validator instanceof ValidatorInterface) { |
|
|
|||
22 | 1 | throw new InvalidArgumentException('You can only append a Del\Form\Validator\ValidatorInterface.'); |
|
23 | } |
||
24 | 25 | parent::append($validator); |
|
25 | 25 | return $this; |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * @return ValidatorInterface |
||
30 | */ |
||
31 | 23 | public function current() |
|
34 | } |
||
35 | } |