Passed
Pull Request — master (#1)
by Grebenikov
04:28
created

MinuboConsole::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Minubo\Communication\Console;
9
10
use Spryker\Zed\Kernel\Communication\Console\Console;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
14
/**
15
 * @method \SprykerEco\Zed\Minubo\Business\MinuboFacadeInterface getFacade()
16
 */
17
class MinuboConsole extends Console
18
{
19
    const COMMAND_NAME = 'minubo:export:data';
20
    const DESCRIPTION = 'Run export of data to Minubo';
21
22
    /**
23
     * @return void
24
     */
25
    protected function configure(): void
26
    {
27
        $this->setName(static::COMMAND_NAME)
28
            ->setDescription(static::DESCRIPTION);
29
    }
30
31
    /**
32
     * @param \Symfony\Component\Console\Input\InputInterface $input
33
     * @param \Symfony\Component\Console\Output\OutputInterface $output
34
     *
35
     * @return int|null
36
     */
37
    protected function execute(InputInterface $input, OutputInterface $output): ?int
38
    {
39
40
        $this->getFacade()
41
            ->exportData();
42
43
        return static::CODE_SUCCESS;
44
    }
45
}
46