Passed
Push — master ( 39dd2f...8ee4e9 )
by Rafal
03:50
created

ImportLiveGame::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace App\GameApi\Communication\Command;
5
6
use App\GameApi\Business\WorldCupSfgIo\Import\LiveGameInterface;
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
class ImportLiveGame extends Command
12
{
13
    /**
14
     * @var LiveGameInterface
15
     */
16
    private $liveGame;
17
18
    const COMMAND_NAME = 'api:import:live-game';
19
    const DESCRIPTION = 'Import live games from api';
20
21
    /**
22
     * @param LiveGameInterface $game
23
     */
24
    public function __construct(LiveGameInterface $liveGame)
25
    {
26
        $this->liveGame = $liveGame;
27
        parent::__construct();
28
    }
29
30
    /**
31
     * @return void
32
     */
33
    protected function configure()
34
    {
35
        $this->setName(static::COMMAND_NAME)
36
            ->setDescription(static::DESCRIPTION);
37
    }
38
39
    protected function execute(InputInterface $input, OutputInterface $output)
40
    {
41
        $this->liveGame->updateLiveGames();
42
    }
43
}