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

BootstrapCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 11
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 0
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