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

GamesFetchCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 36
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A configure() 0 5 1
A execute() 0 4 1
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