Completed
Push — master ( 035ed0...4cfde5 )
by Jonas
04:22
created

GamesFetchCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of SteamScore.
7
 *
8
 * (c) SteamScore <[email protected]>
9
 *
10
 * This Source Code Form is subject to the terms of the Mozilla Public
11
 * License, v. 2.0. If a copy of the MPL was not distributed with this
12
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
13
 */
14
15
namespace SteamScore\Api\Console\Commands;
16
17
use SteamScore\Api\Domain\Jobs\FetchAllGamesJob;
18
use Symfony\Component\Console\Command\Command;
19
use Symfony\Component\Console\Input\InputInterface;
20
use Symfony\Component\Console\Output\OutputInterface;
21
22
final class GamesFetchCommand extends Command
23
{
24
    /**
25
     * @var FetchAllGamesJob
26
     */
27
    private $job;
28
29
    /**
30
     * Constructor.
31
     *
32
     * @param FetchAllGamesJob $job
33
     */
34
    public function __construct(FetchAllGamesJob $job)
35
    {
36
        parent::__construct();
37
38
        $this->job = $job;
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    protected function configure()
45
    {
46
        $this->setName('games:fetch');
47
        $this->setDescription('Fetch all games from SteamSpy.');
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    protected function execute(InputInterface $input, OutputInterface $output)
54
    {
55
        $this->job->execute();
56
    }
57
}
58