Conditions | 3 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
20 | public static function exec($route, array $args, $wait = false) |
||
21 | { |
||
22 | $path = dirname(__DIR__) . '/bin/hidev'; |
||
23 | $command = "$path $route"; |
||
24 | foreach ($args as $arg) { |
||
25 | $command .= ' ' . escapeshellarg($arg); |
||
26 | } |
||
27 | $amp = $wait ? '' : '&'; |
||
28 | |||
29 | return exec("$command > /dev/null 2>&1 $amp"); |
||
30 | } |
||
31 | } |
||
32 |