Completed
Push — development ( 4cbc56...9c238f )
by Thomas
27s
created

OkapiCronjobsCommand::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/***************************************************************************
3
 * For license information see LICENSE.md
4
 ***************************************************************************/
5
6
namespace AppBundle\Command;
7
8
use okapi\Okapi;
9
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Output\OutputInterface;
12
13
class OkapiCronjobsCommand extends ContainerAwareCommand
14
{
15
    const COMMAND_NAME = 'okapi:cronjobs';
16
17
    protected function configure()
18
    {
19
        parent::configure();
20
21
        $this
22
            ->setName(self::COMMAND_NAME)
23
            ->setDescription('executes okapi5 cronjobs');
24
    }
25
26
    protected function execute(InputInterface $input, OutputInterface $output)
27
    {
28
        require_once __DIR__.'/../../../okapi/autoload.php';
0 ignored issues
show
introduced by
Expected 1 space before ., but 0 found
Loading history...
introduced by
Expected 1 space after ., but 0 found
Loading history...
29
        Okapi::execute_prerequest_cronjobs();
30
        Okapi::execute_cron5_cronjobs();
31
    }
32
}
33