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