DumpCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
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