SecondStepController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpMyAdmin\Controllers\Normalization\FirstNormalForm;
6
7
use PhpMyAdmin\Controllers\InvocableController;
8
use PhpMyAdmin\Current;
9
use PhpMyAdmin\Http\Response;
10
use PhpMyAdmin\Http\ServerRequest;
11
use PhpMyAdmin\Normalization;
12
use PhpMyAdmin\ResponseRenderer;
13
14
final class SecondStepController implements InvocableController
15
{
16 4
    public function __construct(
17
        private readonly ResponseRenderer $response,
18
        private readonly Normalization $normalization,
19
    ) {
20 4
    }
21
22 4
    public function __invoke(ServerRequest $request): Response|null
23
    {
24 4
        $res = $this->normalization->getHtmlContentsFor1NFStep2(Current::$database, Current::$table);
25 4
        $this->response->addJSON($res);
26
27 4
        return null;
28
    }
29
}
30