Passed
Push — main ( b86851...42a9a8 )
by Daniel
04:14
created

BootstrapCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
A __construct() 0 11 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 Psr\Container\ContainerInterface;
9
use Uxmp\Core\Component\Setup\BootstrapperInterface;
10
11
final class BootstrapCommand extends Command
12
{
13 1
    public function __construct(
14
        private readonly ContainerInterface $dic,
15
    ) {
16 1
        parent::__construct(
17
            'setup:bootstrap',
18
            'Bootstraps uxmp'
19
        );
20
21
        $this
22 1
            ->usage(
23
                '<bold>  $0 sb</end> <comment></end> ## Bootstraps uxmp<eol/>'
24
            );
25
    }
26
27 1
    public function execute(): void
28
    {
29 1
        $this->dic->get(BootstrapperInterface::class)->bootstrap($this->app()?->io());
30
    }
31
}
32