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