Lines 100.00% 3 / 3
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
Read 100.00% 3 / 3 100.00% 1 / 1 1 100.00% 1 / 1
 __invoke 100.00% 3 / 3 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Controller\AgentStat;
6
7use App\Controller\BaseController;
8use App\Entity\AgentStat;
9use App\Security\Voter\AgentStatVoter;
10use Symfony\Component\HttpFoundation\Response;
11use Symfony\Component\Routing\Attribute\Route;
12use Symfony\Component\Security\Http\Attribute\IsGranted;
13
14#[Route('/agent-stats/{id}', name: 'app_agent_stat_show', requirements: ['id' => '\d+'], methods: ['GET'])]
15#[IsGranted(AgentStatVoter::VIEW, subject: 'agentStat')]
16final class Read extends BaseController
17{
18    public function __invoke(AgentStat $agentStat): Response
19    {
20        return $this->render('agent_stat/show.html.twig', [
21            'agent_stat' => $agentStat,
22        ]);
23    }
24}