| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function validate($value, Constraint $constraint): void |
||
| 22 | { |
||
| 23 | if (null === $value || '' === $value) { |
||
| 24 | return; |
||
| 25 | } |
||
| 26 | |||
| 27 | if ('.' !== substr($value, -1)) { |
||
| 28 | $this->context->buildViolation($constraint->message) |
||
| 29 | ->setParameter('{{ string }}', $value) |
||
| 30 | ->addViolation(); |
||
| 31 | } |
||
| 34 |