@@ -87,6 +87,9 @@ |
||
87 | 87 | $this->process->stop(); |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param null|PhiremockProcess $process |
|
92 | + */ |
|
90 | 93 | private function initProcess($process) |
91 | 94 | { |
92 | 95 | $this->process = $process === null ? new PhiremockProcess() : $process; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | array $options, |
60 | 60 | PhiremockProcess $process = null |
61 | 61 | ) { |
62 | - $this->config['bin_path'] = Config::projectDir() . '../vendor/bin/phiremock'; |
|
62 | + $this->config['bin_path'] = Config::projectDir().'../vendor/bin/phiremock'; |
|
63 | 63 | $this->config['logs_path'] = Config::logDir(); |
64 | 64 | parent::__construct($config, $options); |
65 | 65 |
@@ -47,19 +47,19 @@ |
||
47 | 47 | */ |
48 | 48 | public function start($ip, $port, $path, $logsPath, $debug) |
49 | 49 | { |
50 | - $phiremockPath = is_file($path) ? $path : $path . DIRECTORY_SEPARATOR . 'phiremock'; |
|
50 | + $phiremockPath = is_file($path) ? $path : $path.DIRECTORY_SEPARATOR.'phiremock'; |
|
51 | 51 | if ($debug) { |
52 | - echo 'Running ' . $this->getCommandPrefix() |
|
52 | + echo 'Running '.$this->getCommandPrefix() |
|
53 | 53 | . "{$phiremockPath} -i {$ip} -p {$port}" |
54 | - . ($debug? ' -d' : '') . PHP_EOL; |
|
54 | + . ($debug ? ' -d' : '').PHP_EOL; |
|
55 | 55 | } |
56 | 56 | $this->process = new Process( |
57 | 57 | $this->getCommandPrefix() |
58 | 58 | . "{$phiremockPath} -i {$ip} -p {$port}" |
59 | 59 | . ($debug ? ' -d' : '') |
60 | 60 | ); |
61 | - $logFile = $logsPath . DIRECTORY_SEPARATOR . self::LOG_FILE_NAME; |
|
62 | - $this->process->start(function ($type, $buffer) use ($logFile) { |
|
61 | + $logFile = $logsPath.DIRECTORY_SEPARATOR.self::LOG_FILE_NAME; |
|
62 | + $this->process->start(function($type, $buffer) use ($logFile) { |
|
63 | 63 | file_put_contents($logFile, $buffer, FILE_APPEND); |
64 | 64 | }); |
65 | 65 | $this->process->setEnhanceSigchildCompatibility(true); |