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

AbstractShortcutAwareImportCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
/**
4
 * TechDivision\Import\Cli\Command\AbstractShortcutAwareImportCommand
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\OperationKeys;
24
use Symfony\Component\Console\Input\InputArgument;
25
26
/**
27
 * The command implementation for shortcut aware import commands.
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
abstract class AbstractShortcutAwareImportCommand 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->addArgument(InputArgumentKeys::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for the import, one of "add-update", "replace", "delete" or "convert" or a combination of them', OperationKeys::ADD_UPDATE);
49
50
        // invoke the parent method
51
        parent::configure();
52
    }
53
}
54