@@ -48,20 +48,20 @@ |
||
| 48 | 48 | public function start($ip, $port, $path, $logsPath, $debug) |
| 49 | 49 | { |
| 50 | 50 | $path = realpath($path); |
| 51 | - $phiremockPath = is_file($path) ? $path : $path . DIRECTORY_SEPARATOR . 'phiremock'; |
|
| 51 | + $phiremockPath = is_file($path) ? $path : $path.DIRECTORY_SEPARATOR.'phiremock'; |
|
| 52 | 52 | |
| 53 | 53 | if ($debug) { |
| 54 | - echo 'Running ' . $this->getCommandPrefix() |
|
| 54 | + echo 'Running '.$this->getCommandPrefix() |
|
| 55 | 55 | . "{$phiremockPath} -i {$ip} -p {$port}" |
| 56 | - . ($debug? ' -d' : '') . PHP_EOL; |
|
| 56 | + . ($debug ? ' -d' : '').PHP_EOL; |
|
| 57 | 57 | } |
| 58 | 58 | $this->process = new Process( |
| 59 | 59 | $this->getCommandPrefix() |
| 60 | 60 | . "{$phiremockPath} -i {$ip} -p {$port}" |
| 61 | 61 | . ($debug ? ' -d' : '') |
| 62 | 62 | ); |
| 63 | - $logFile = $logsPath . DIRECTORY_SEPARATOR . self::LOG_FILE_NAME; |
|
| 64 | - $this->process->start(function ($type, $buffer) use ($logFile) { |
|
| 63 | + $logFile = $logsPath.DIRECTORY_SEPARATOR.self::LOG_FILE_NAME; |
|
| 64 | + $this->process->start(function($type, $buffer) use ($logFile) { |
|
| 65 | 65 | file_put_contents($logFile, $buffer, FILE_APPEND); |
| 66 | 66 | }); |
| 67 | 67 | $this->process->setEnhanceSigchildCompatibility(true); |