AsyncExecuterService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 16
rs 10
wmc 2
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A runBashCommand() 0 8 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: benedikt
5
 * Date: 6/28/18
6
 * Time: 5:41 PM
7
 */
8
9
namespace Tfboe\FmLib\Service;
10
11
12
class AsyncExecuterService implements AsyncExecuterServiceInterface
13
{
14
//<editor-fold desc="Public Methods">
15
  /**
16
   * @param $command
17
   */
18
  public function runBashCommand($command)
19
  {
20
    if (substr(php_uname(), 0, 7) == "Windows") {
21
      pclose(popen("start /B " . $command, "r"));
22
    } else {
23
      exec($command . " > /dev/null &");
24
    }
25
  }
26
//</editor-fold desc="Public Methods">
27
}