DefaultExecutor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 8 1
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Shell\Business\Executor;
6
7
8
class DefaultExecutor implements ExecutorInterface
9
{
10
    /**
11
     * @param $command
12
     *
13
     * @return string
14
     */
15 1
    public function execute($command): string
16
    {
17 1
        ob_start();
18 1
        passthru($command);
19 1
        $output = ob_get_contents();
20 1
        ob_end_clean();
21
22 1
        return $output;
23
    }
24
25
}