| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function validate($waypoint, Constraint $constraint) |
||
| 39 | { |
||
| 40 | $valid = parent::validate($waypoint, $constraint); |
||
| 41 | |||
| 42 | if (!$valid) { |
||
| 43 | return false; |
||
| 44 | } |
||
| 45 | |||
| 46 | $geoCache = $this->geoCacheService->fetchByWaypoint($waypoint); |
||
| 47 | |||
| 48 | if ($geoCache === null) { |
||
| 49 | $this->context->buildViolation($constraint->messageNotFound) |
||
| 50 | ->setParameter('%waypoint%', $waypoint) |
||
| 51 | ->addViolation(); |
||
| 52 | } |
||
| 53 | |||
| 54 | return true; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |