| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class VerifyCsrfToken |
||
| 13 | { |
||
| 14 | private CsrfTokenManagerInterface $tokenManager; |
||
| 15 | |||
| 16 | public function __construct(CsrfTokenManagerInterface $tokenManager) |
||
| 17 | { |
||
| 18 | $this->tokenManager = $tokenManager; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function handle(Request $request): void |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | private function isCsrfTokenValid(?string $token): bool |
||
| 29 | { |
||
| 30 | return $this->tokenManager->isTokenValid(new CsrfToken('csrf_token', $token)); |
||
| 31 | } |
||
| 32 | |||
| 33 | private function getToken(Request $request) |
||
| 37 | } |
||
| 38 | } |
||
| 39 |