Passed
Push — 8.x ( 129a4a...ab4097 )
by Tim
09:56
created

ImportExecuteCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
1
<?php
2
3
/**
4
 * TechDivision\Import\Cli\Command\ImportExecuteOperationsCommand
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 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2019 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/techdivision/import-cli-simple
18
 * @link      http://www.techdivision.com
19
 */
20
21
namespace TechDivision\Import\Cli\Command;
22
23
use TechDivision\Import\Utils\CommandNames;
24
use Symfony\Component\Console\Input\InputArgument;
25
26
/**
27
 * The import command implementation.
28
 *
29
 * @author    Tim Wagner <[email protected]>
30
 * @copyright 2019 TechDivision GmbH <[email protected]>
31
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
 * @link      https://github.com/techdivision/import-cli-simple
33
 * @link      http://www.techdivision.com
34
 */
35
class ImportExecuteCommand extends AbstractImportCommand
36
{
37
38
    /**
39
     * Configures the current command.
40
     *
41
     * @return void
42
     * @see \Symfony\Component\Console\Command\Command::configure()
43
     */
44
    protected function configure()
45
    {
46
47
        // initialize the command with the required/optional options
48
        $this->setName(CommandNames::IMPORT_EXECUTE)
49
             ->setDescription('Executes the operations passed as argument')
50
             ->addArgument(InputArgumentKeys::OPERATION_NAMES, InputArgument::IS_ARRAY|InputArgument::OPTIONAL, 'The operation(s) that has to be executed');
51
52
        // invoke the parent method
53
        parent::configure();
54
    }
55
}
56