Passed
Push — main ( 615377...62c5ea )
by Chema
54s queued 13s
created

HelloController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Config\Module\Controller;
6
7
use Gacela\Router\Entities\JsonResponse;
8
9
final class HelloController
10
{
11
    public function __invoke(string $name = ''): JsonResponse
12
    {
13
        return new JsonResponse([
14
            'hello' => $name ?: 'bob?',
15
        ]);
16
    }
17
}
18