Local::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Assimtech\Tempo\Node;
4
5
use ArrayObject;
6
use Symfony\Component\Process\Process;
7
8
class Local extends ArrayObject implements NodeInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 1
    public function run($command)
14
    {
15 1
        $process = new Process($command);
16
17
        $process
18 1
            ->setTimeout(null)
19 1
            ->mustRun()
20
        ;
21
22 1
        return $process->getOutput();
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 1
    public function __toString()
29
    {
30 1
        return 'localhost';
31
    }
32
}
33