| Conditions | 4 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function validate($value, Constraint $constraint) |
||
| 19 | { |
||
| 20 | parent::validate($value, $constraint); |
||
| 21 | |||
| 22 | if ($value && !IsoCodes\PhoneNumber::validate( |
||
| 23 | $value, |
||
| 24 | PhoneNumber::ANY === $constraint->country ? null : $constraint->country |
||
| 25 | )) { |
||
| 26 | $this->createViolation($constraint->message); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | } |
||
| 30 |