ShellExec   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 14
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 7 2
1
<?php
2
3
4
namespace Nexus\Shell\Business\Model\Executor;
5
6
7
class ShellExec implements ExecutorInterface
8
{
9
    /**
10
     * @param string $command
11
     *
12
     * @return string
13
     */
14
    public function execute(string $command): string
15
    {
16
        $result = shell_exec($command);
17
        if ($result === null) {
18
            $result = '';
19
        }
20
        return $result;
21
    }
22
23
}