Completed
Push — pac-89--debug-report ( edb11c )
by Marcus
04:32
created

DebugSendCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 19
ccs 0
cts 6
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 10 1
1
<?php
2
3
/**
4
 * TechDivision\Import\Cli\Command\DebugSendCommand
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 7
13
 *
14
 * @author    Marcus Döllerer <[email protected]>
15
 * @copyright 2020 TechDivision GmbH <[email protected]>
16
 * @license   https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/techdivision/import-cli
18
 * @link      https://www.techdivision.com
19
 */
20
21
namespace TechDivision\Import\Cli\Command;
22
23
use Symfony\Component\Console\Input\InputArgument;
24
use TechDivision\Import\Utils\CommandNames;
25
use TechDivision\Import\Utils\InputArgumentKeysInterface;
26
27
/**
28
 * Command implementation that creates and sends a debug report via email.
29
 *
30
 * @author    Marcus Döllerer <[email protected]>
31
 * @copyright 2020 TechDivision GmbH <[email protected]>
32
 * @license   https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
33
 * @link      https://github.com/techdivision/import-cli
34
 * @link      https://www.techdivision.com
35
 */
36
class DebugSendCommand extends AbstractImportCommand
37
{
38
39
    /**
40
     * Configures the current command.
41
     *
42
     * @return void
43
     * @see \Symfony\Component\Console\Command\Command::configure()
44
     */
45
    protected function configure()
46
    {
47
48
        // initialize the command with the required/optional options
49
        $this->setName(CommandNames::DEBUG_SEND)
0 ignored issues
show
Bug introduced by
The constant TechDivision\Import\Utils\CommandNames::DEBUG_SEND was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
50
            ->addArgument(InputArgumentKeysInterface::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for the import, one of "debug-send" or a combination of them', 'debug-send')
51
            ->setDescription('Creates a debug dump and mails it to the specified recipient');
52
53
        // invoke the parent method
54
        parent::configure();
55
    }
56
}
57