Test Failed
Push — master ( 20ba26...d79798 )
by Jeroen
03:31
created

GenerateSitemapCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JeroenDesloovere\SitemapBundle\Console;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * Build sitemap
11
 * Example: "bin/console sitemap:generate"
12
 */
13
class GenerateSitemapCommand extends ContainerAwareCommand
14
{
15
    protected function configure(): void
16
    {
17
        $this
18
            ->setName('sitemap:generate')
19
            ->setDescription('Generate the sitemapindex and all the sitemaps');
20
    }
21
22
    protected function execute(InputInterface $input, OutputInterface $output): void
23
    {
24
        $this->getContainer()->get('sitemap.generator')->generate();
25
    }
26
}
27