MinuboConsole   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 8
c 1
b 0
f 1
dl 0
loc 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
A execute() 0 6 1
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
 * @method \SprykerEco\Zed\Minubo\Persistence\MinuboRepositoryInterface getRepository()
17
 * @method \SprykerEco\Zed\Minubo\Communication\MinuboCommunicationFactory getFactory()
18
 */
19
class MinuboConsole extends Console
20
{
21
    /**
22
     * @var string
23
     */
24
    public const COMMAND_NAME = 'minubo:export:data';
25
26
    /**
27
     * @var string
28
     */
29
    public const DESCRIPTION = 'Run export of data to Minubo';
30
31
    /**
32
     * @return void
33
     */
34
    protected function configure(): void
35
    {
36
        $this->setName(static::COMMAND_NAME)
37
            ->setDescription(static::DESCRIPTION);
38
    }
39
40
    /**
41
     * @param \Symfony\Component\Console\Input\InputInterface $input
42
     * @param \Symfony\Component\Console\Output\OutputInterface $output
43
     *
44
     * @return int|null
45
     */
46
    protected function execute(InputInterface $input, OutputInterface $output): ?int
47
    {
48
        $this->getFacade()
49
            ->exportData();
50
51
        return static::CODE_SUCCESS;
52
    }
53
}
54