Completed
Push — master ( d4177d...478de1 )
by Marcus
04:46
created

AbstractShortcutAwareImportCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

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
ccs 0
cts 4
cp 0
crap 2
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
use TechDivision\Import\Utils\InputArgumentKeysInterface;
26
27
/**
28
 * The command implementation for shortcut aware import commands.
29
 *
30
 * @author    Tim Wagner <[email protected]>
31
 * @copyright 2019 TechDivision GmbH <[email protected]>
32
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
33
 * @link      https://github.com/techdivision/import-cli-simple
34
 * @link      http://www.techdivision.com
35
 */
36
abstract class AbstractShortcutAwareImportCommand 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->addArgument(InputArgumentKeysInterface::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);
50
51
        // invoke the parent method
52
        parent::configure();
53
    }
54
}
55