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

OkapiCronjobsCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

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