ModulesRunning::execute()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 2
crap 2
1
<?php
2
namespace Samurai\Project\Task;
3
4
use Samurai\Module\Task\Running;
5
use Samurai\Task\ITask;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * Class ModulesRunning
11
 * @package Samurai\Project\Task
12
 * @author Raphaël Lefebvre <[email protected]>
13
 */
14
class ModulesRunning extends Running
15
{
16
    /**
17
     * @param InputInterface $input
18
     * @param OutputInterface $output
19
     * @return int|null
20
     */
21 2
    public function execute(InputInterface $input, OutputInterface $output)
22
    {
23 2
        if($input->getOption('no-module')){
24 1
            return ITask::NO_ERROR_CODE;
25
        }
26 1
        return $this->runModules($input, $output, $this->getService('module_manager')->getAll());
27
    }
28
}
29