GenerateTimeZonesMapDataCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace libphonenumber\buildtools\Commands;
4
5
use libphonenumber\buildtools\GenerateTimeZonesMapData;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputArgument;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
class GenerateTimeZonesMapDataCommand extends Command
12
{
13
    protected function configure()
14
    {
15
        $this->setName('GenerateTimeZonesMapData');
16
        $this->setDescription('Generate time zone data files');
17
        $this->setDefinition(
18
            array(
19
                new InputArgument('InputFile', InputArgument::REQUIRED, 'The input file containing the timezone map data'),
20
                new InputArgument('OutputDirectory', InputArgument::REQUIRED, 'The output directory to save the file'),
21
            )
22
        );
23
    }
24
25
    protected function execute(InputInterface $input, OutputInterface $output)
26
    {
27
        new GenerateTimeZonesMapData($input->getArgument('InputFile'), $input->getArgument('OutputDirectory'));
28
29
        return 0;
30
    }
31
}
32