HelloWorldAction::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 4
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Controller;
6
7
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
8
use Symfony\Component\HttpFoundation\Response;
9
use Symfony\Component\HttpKernel\Attribute\Cache;
10
use Symfony\Component\Routing\Attribute\Route;
11
12
/**
13
 * We use the two binds we have defined in config/services.php::49.
14
 */
15
#[Cache(maxage: 3600, public: true)]
16
final class HelloWorldAction extends AbstractController
17
{
18 1
    #[Route(path: '/hello-world', name: self::class)]
19
    public function __invoke(string $environment, bool $debug): Response
20
    {
21 1
        return $this->render(self::class.'.html.twig', [
22 1
            'environment' => $environment,
23 1
            'debug' => $debug,
24 1
        ]);
25
    }
26
}
27