BuildFromUrlCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 9 1
A execute() 0 6 1
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