DefaultExecutor::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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
}