Kmom01   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 12
c 0
b 0
f 0
dl 0
loc 30
rs 10
ccs 0
cts 12
cp 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A report() 0 4 1
A lucky() 0 10 1
A about() 0 4 1
A home() 0 4 1
1
<?php
2
3
namespace App\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6
use Symfony\Component\HttpFoundation\Response;
7
use Symfony\Component\Routing\Attribute\Route;
8
9
class Kmom01 extends AbstractController
10
{
11
    #[Route("/", name: "home")]
12
    public function home(): Response
13
    {
14
        return $this->render('home.html.twig');
15
    }
16
17
    #[Route("/about", name: "about")]
18
    public function about(): Response
19
    {
20
        return $this->render('about.html.twig');
21
    }
22
23
    #[Route("/report", name: "report")]
24
    public function report(): Response
25
    {
26
        return $this->render('report.html.twig');
27
    }
28
29
    #[Route("/lucky", name: "lucky")]
30
    public function lucky(): Response
31
    {
32
        $number = random_int(1, 100);
33
34
        $data = [
35
            'number' => $number
36
        ];
37
38
        return $this->render('lucky.html.twig', $data);
39
    }
40
}
41