DumpCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 8 1
A execute() 0 9 1
1
<?php
2
3
namespace MyBuilder\Bundle\CronosBundle\Command;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
/**
9
 * Dump the cron file that would be produced from the cron annotations in this project.
10
 */
11
class DumpCommand extends CommandBase
12
{
13
    /**
14
     * @inheritdoc
15
     */
16
    protected function configure()
17
    {
18
        $this
19
            ->setName('cronos:dump')
20
            ->setDescription('Dump cron configuration');
21
22
        $this->addServerOption();
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28
    protected function execute(InputInterface $input, OutputInterface $output)
29
    {
30
        $cron = $this->configureCronExport($input, $output);
31
32
        $output->writeln('<info>We would have put the following in cron</info>');
33
        $output->write($content = $cron->format());
34
35
        return 0;
36
    }
37
}
38