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

GenerateSitemapCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

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