| Conditions | 2 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 48 | 11 | public function validate($value, ElementInterface $element): FormError |
|
| 49 | { |
||
| 50 | try { |
||
| 51 | 11 | return (new ConstraintValueValidator([new CsrfConstraint($this->options + ['manager' => $element->getTokenManager()])]))->validate($value, $element); |
|
|
|
|||
| 52 | } finally { |
||
| 53 | 11 | if ($this->invalidate) { |
|
| 54 | 11 | $element->invalidateToken(); |
|
| 55 | } |
||
| 67 |