CommandRunner   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 5 1
1
<?php
2
/**
3
 * Command runner
4
 *
5
 * @author    Matthias Gisder <[email protected]>
6
 * @copyright 2014 inGenerator Ltd
7
 * @licence   BSD
8
 */
9
10
11
namespace Ingenerator\RunSingle;
12
13
14
class CommandRunner
15
{
16
17
    /**
18
     * @param string $command
19
     *
20
     * @return integer
0 ignored issues
show
Documentation introduced by
Should the return type not be integer|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
21
     */
22
    public function execute($command)
23
    {
24
        \system($command, $exit_code);
25
        return $exit_code;
26
    }
27
}
28