Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function validate($iri, Constraint $constraint): void |
||
37 | { |
||
38 | try { |
||
39 | $this->converter->getRouterParametersFromIri((string) $iri); |
||
40 | } catch (InvalidArgumentException $e) { |
||
41 | $this->context->buildViolation($constraint->message) |
||
42 | ->setParameter('{{ value }}', $iri ?? 'null') |
||
43 | ->addViolation(); |
||
44 | } |
||
47 |