Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| AltchaChallengeController | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __invoke | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Controller; |
| 4 | |
| 5 | use App\Security\Service\AltchaServiceInterface; |
| 6 | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
| 7 | use Symfony\Component\HttpFoundation\JsonResponse; |
| 8 | use Symfony\Component\Routing\Attribute\Route; |
| 9 | |
| 10 | /** |
| 11 | * @author Wilhelm Zwertvaegher |
| 12 | */ |
| 13 | class AltchaChallengeController extends AbstractController |
| 14 | { |
| 15 | public function __construct(private readonly AltchaServiceInterface $altchaService) |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | #[Route('/altcha', name: 'altcha', methods: ['GET'])] |
| 20 | public function __invoke(): JsonResponse |
| 21 | { |
| 22 | return $this->json($this->altchaService->createChallenge()); |
| 23 | } |
| 24 | } |