BuildFromUrlCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace SixtyNine\Cloud\Command;
4
5
use Symfony\Component\Console\Input\InputArgument;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Input\InputOption;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class BuildFromUrlCommand extends BaseCloudCommand
11
{
12
    /** {@inheritdoc} */
13
    protected function configure()
14
    {
15
        parent::configure();
16
        $this
17
            ->setName('cloud:from-url')
18
            ->setDescription('Create a cloud from a URL')
19
            ->addArgument('url', InputArgument::REQUIRED, 'The URL for the words')
20
        ;
21
    }
22
23
    /** {@inheritdoc} */
24
    protected function execute(InputInterface $input, OutputInterface $output)
25
    {
26
        $helper = new CommandsHelper();
27
        $timing = $helper->createCloud('from-url', $input);
28
        $output->writeln(sprintf('Cloud generated in %s seconds', $timing->getDuration() / 1000));
29
    }
30
}
31