| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function configureOptions(OptionsResolver $resolver): void |
||
| 41 | { |
||
| 42 | if (!$this->tokenStorage->getToken()) { |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | |||
| 46 | if (!$this->authorizationChecker->isGranted($this->role)) { |
||
| 47 | return; |
||
| 48 | } |
||
| 49 | |||
| 50 | $resolver->setDefaults([ |
||
| 51 | 'csrf_protection' => false, |
||
| 52 | ]); |
||
| 53 | } |
||
| 54 | |||
| 60 |