ImportDebugCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 20
ccs 0
cts 7
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 11 1
1
<?php
2
3
/**
4
 * TechDivision\Import\Cli\Command\ImportDebugCommand
5
 *
6
 * PHP version 7
7
 *
8
 * @author    Marcus Döllerer <[email protected]>
9
 * @copyright 2020 TechDivision GmbH <[email protected]>
10
 * @license   https://opensource.org/licenses/MIT
11
 * @link      https://github.com/techdivision/import-cli
12
 * @link      https://www.techdivision.com
13
 */
14
15
namespace TechDivision\Import\Cli\Command;
16
17
use Symfony\Component\Console\Input\InputOption;
18
use Symfony\Component\Console\Input\InputArgument;
19
use TechDivision\Import\Utils\CommandNames;
20
use TechDivision\Import\Utils\InputArgumentKeysInterface;
21
use TechDivision\Import\Utils\InputOptionKeysInterface;
22
23
/**
24
 * Command implementation that provides debugging functionality.
25
 *
26
 * @author    Marcus Döllerer <[email protected]>
27
 * @copyright 2020 TechDivision GmbH <[email protected]>
28
 * @license   https://opensource.org/licenses/MIT
29
 * @link      https://github.com/techdivision/import-cli
30
 * @link      https://www.techdivision.com
31
 */
32
class ImportDebugCommand extends AbstractImportCommand
33
{
34
35
    /**
36
     * Configures the current command.
37
     *
38
     * @return void
39
     * @see \Symfony\Component\Console\Command\Command::configure()
40
     */
41
    protected function configure()
42
    {
43
        // initialize the command with the required/optional options
44
        $this->setName(CommandNames::IMPORT_DEBUG)
45
             ->addArgument(InputArgumentKeysInterface::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for debugging the import, one of "send" or a combination of them', 'send')
46
             ->addOption(InputOptionKeysInterface::RENDER_DEBUG_SERIALS, null, InputOption::VALUE_OPTIONAL, 'The number of debug serials rendered on the console', 10)
47
            ->addOption(InputOptionKeysInterface::CONFIG_OUTPUT, null, InputOption::VALUE_REQUIRED, 'The available Configuration Files')
48
            ->setDescription('Creates a debug dump and mails it to the specified recipient');
49
50
        // invoke the parent method
51
        parent::configure();
52
    }
53
}
54