BootstrapCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 9
c 1
b 0
f 0
dl 0
loc 20
ccs 12
cts 12
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A execute() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Uxmp\Core\Component\Cli;
6
7
use Ahc\Cli\Input\Command;
8
use Ahc\Cli\IO\Interactor;
9
use Psr\Container\ContainerInterface;
10
use Uxmp\Core\Component\Setup\BootstrapperInterface;
11
12
final class BootstrapCommand extends Command
13
{
14 1
    public function __construct(
15
        private readonly ContainerInterface $dic,
16
    ) {
17 1
        parent::__construct(
18 1
            'setup:bootstrap',
19 1
            'Bootstraps uxmp'
20 1
        );
21
22 1
        $this
23 1
            ->usage(
24 1
                '<bold>  $0 sb</end> <comment></end> ## Bootstraps uxmp<eol/>'
25 1
            );
26
    }
27
28 1
    public function execute(): void
29
    {
30 1
        $this->dic->get(BootstrapperInterface::class)->bootstrap(
31 1
            new Interactor()
32 1
        );
33
    }
34
}
35