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

NewGameCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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