ImportCreateOkFileCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 19
ccs 0
cts 5
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\ImportCreateOkFileCommand
5
 *
6
 * PHP version 7
7
 *
8
 * @author    Tim Wagner <[email protected]>
9
 * @copyright 2016 TechDivision GmbH <[email protected]>
10
 * @license   https://opensource.org/licenses/MIT
11
 * @link      https://github.com/techdivision/import-cli-simple
12
 * @link      http://www.techdivision.com
13
 */
14
15
namespace TechDivision\Import\Cli\Command;
16
17
use Symfony\Component\Console\Input\InputArgument;
18
use TechDivision\Import\Utils\CommandNames;
19
use TechDivision\Import\Utils\InputArgumentKeysInterface;
20
21
/**
22
 * The command implementation that creates a OK file from a directory with CSV files.
23
 *
24
 * @author    Tim Wagner <[email protected]>
25
 * @copyright 2016 TechDivision GmbH <[email protected]>
26
 * @license   https://opensource.org/licenses/MIT
27
 * @link      https://github.com/techdivision/import-cli-simple
28
 * @link      http://www.techdivision.com
29
 */
30
class ImportCreateOkFileCommand extends AbstractImportCommand
31
{
32
33
    /**
34
     * Configures the current command.
35
     *
36
     * @return void
37
     * @see \Symfony\Component\Console\Command\Command::configure()
38
     */
39
    protected function configure()
40
    {
41
42
        // initialize the command with the required/optional options
43
        $this->setName(CommandNames::IMPORT_CREATE_OK_FILE)
44
            ->addArgument(InputArgumentKeysInterface::SHORTCUT, InputArgument::OPTIONAL, 'The shortcut that defines the operation(s) that has to be used for the import, one of "create-ok-files" or a combination of them', 'create-ok-files')
45
            ->setDescription('Create\'s the OK file for the CSV files of the configured source directory');
46
47
        // invoke the parent method
48
        parent::configure();
49
    }
50
}
51