IndexController::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/Controller/IndexController.php
5
 *
6
 * @author TLe, Tarmo Leppänen <[email protected]>
7
 */
8
9
namespace App\Controller;
10
11
use Symfony\Component\HttpFoundation\JsonResponse;
12
use Symfony\Component\HttpFoundation\Request;
13
use Symfony\Component\HttpKernel\Attribute\AsController;
14
use Symfony\Component\Routing\Annotation\Route;
15
16
/**
17
 * Class IndexController
18
 *
19
 * @package App\Controller
20
 * @author TLe, Tarmo Leppänen <[email protected]>
21
 */
22
#[AsController]
23
class IndexController
24
{
25
    /**
26
     * Default application response when requested root.
27
     */
28 2
    #[Route(
29
        path: '/',
30
        methods: [Request::METHOD_GET],
31
    )]
32
    public function __invoke(): JsonResponse
33
    {
34 2
        return new JsonResponse();
35
    }
36
}
37