Test Failed
Pull Request — master (#38)
by Patrick
03:34
created

ImportActivityConsoleCommandPlugin::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of forecast.it.fill project.
7
 * (c) Patrick Jaja <[email protected]>
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace ForecastAutomation\Activity\Shared\Plugin;
13
14
use ForecastAutomation\Kernel\Shared\Plugin\AbstractCommandPlugin;
15
use Symfony\Component\Console\Input\InputInterface;
16
use Symfony\Component\Console\Output\OutputInterface;
17
18
/**
19
 * @method \ForecastAutomation\Activity\ActivityFacade getFacade()
20
 */
21
class ImportActivityConsoleCommandPlugin extends AbstractCommandPlugin
22
{
23
    public const COMMAND_NAME = 'import:activity';
24
    public const DESCRIPTION = 'This command will import your personal activity based on activated plugins.';
25
26
    protected function configure(): void
27
    {
28
        $this->setName(self::COMMAND_NAME);
29
        $this->setDescription(self::DESCRIPTION);
30
31
        parent::configure();
32
    }
33
34
    protected function execute(InputInterface $input, OutputInterface $output): int
35
    {
36
        $this->getFacade()->send(
37
            $this->getFacade()->collect()
38
        );
39
40
        return self::SUCCESS;
41
    }
42
}
43