Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function validate($value, Constraint $constraint) |
||
17 | { |
||
18 | parent::validate($value, $constraint); |
||
19 | |||
20 | $constraintClass = str_replace('SLLH\\IsoCodesValidator\\Constraints\\', '', get_class($constraint)); |
||
21 | $isoCodesClass = 'IsoCodes\\'.$constraintClass; |
||
22 | |||
23 | if ($value && !$isoCodesClass::validate($value)) { |
||
24 | $this->createViolation($constraint->message); |
||
25 | } |
||
26 | } |
||
27 | } |
||
28 |