Lines
100.00%
6 / 6
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| DefaultController | 100.00% | 6 / 6 | 100.00% | 1 / 1 | 1 | 100.00% | 1 / 1 | |||
| __invoke | 100.00% | 6 / 6 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace App\Controller; | |
| 6 | ||
| 7 | use Symfony\Component\DependencyInjection\Attribute\Autowire; | |
| 8 | use Symfony\Component\HttpFoundation\Response; | |
| 9 | use Symfony\Component\HttpKernel\Kernel; | |
| 10 | use Symfony\Component\Routing\Attribute\Route; | |
| 11 | ||
| 12 | #[Route('/', name: 'app_default', methods: ['GET'])] | |
| 13 | class DefaultController extends BaseController | |
| 14 | { | |
| 15 | public function __invoke( | |
| 16 | #[Autowire('%kernel.project_dir%')] string $projectDir, | |
| 17 | ): Response { | |
| 18 | return $this->render('default/index.html.twig', [ | |
| 19 | 'controller_name' => 'DefaultController', | |
| 20 | 'php_version' => PHP_VERSION, | |
| 21 | 'symfony_version' => Kernel::VERSION, | |
| 22 | 'project_dir' => $projectDir, | |
| 23 | ]); | |
| 24 | } | |
| 25 | } |