Passed
Push — master ( db43e8...42566f )
by Paweł
02:54
created

NewGameCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 15
ccs 3
cts 6
cp 0.5
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
A execute() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Infrastructure\Cli\Command;
6
7
use AardsGerds\Game\Infrastructure\Cli\PlayerInput;
8
use Symfony\Component\Console\Command\Command;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
use Symfony\Component\Console\Style\SymfonyStyle;
12
13
final class NewGameCommand extends Command
14
{
15
    protected static $defaultName = 'game:new';
16
17 2
    protected function configure(): void
18
    {
19
        $this
20 2
            ->setDescription('This command starts new game');
21 2
    }
22
23
    protected function execute(InputInterface $input, OutputInterface $output): int
24
    {
25
        $playerInput = new PlayerInput(new SymfonyStyle($input, $output));
0 ignored issues
show
Unused Code introduced by
The assignment to $playerInput is dead and can be removed.
Loading history...
26
27
        return Command::SUCCESS;
28
    }
29
}
30