Completed
Push — master ( dd67d5...87ef89 )
by Dan
02:57
created

BuildFromFileCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 9 1
A execute() 0 5 1
1
<?php
2
3
namespace SixtyNine\Cloud\Command;
4
5
use Symfony\Component\Console\Command\Command;
6
use Symfony\Component\Console\Input\InputArgument;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Input\InputOption;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
class BuildFromFileCommand extends BaseCloudCommand
12
{
13
    protected function configure()
14
    {
15
        parent::configure();
16
        $this
17
            ->setName('cloud:from-file')
18
            ->setDescription('Create a cloud from the words in a file')
19
            ->addArgument('file', InputArgument::REQUIRED, 'The path to the file containing the words')
20
        ;
21
    }
22
23
    protected function execute(InputInterface $input, OutputInterface $output)
24
    {
25
        $helper = new CommandsHelper();
26
        $helper->createCloud('from-file', $input);
27
    }
28
}
29