@@ -45,7 +45,7 @@ |
||
| 45 | 45 | * @param string $path |
| 46 | 46 | * @param string $logsPath |
| 47 | 47 | * @param bool $debug |
| 48 | - * @param mixed $expectationsPath |
|
| 48 | + * @param string|null $expectationsPath |
|
| 49 | 49 | */ |
| 50 | 50 | public function start($ip, $port, $path, $logsPath, $debug, $expectationsPath) |
| 51 | 51 | { |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function start($ip, $port, $path, $logsPath, $debug, $expectationsPath) |
| 51 | 51 | { |
| 52 | - $phiremockPath = is_file($path) ? $path : $path . DIRECTORY_SEPARATOR . 'phiremock'; |
|
| 52 | + $phiremockPath = is_file($path) ? $path : $path.DIRECTORY_SEPARATOR.'phiremock'; |
|
| 53 | 53 | $expectationsPath = is_dir($expectationsPath) ? $expectationsPath : ''; |
| 54 | 54 | |
| 55 | 55 | $this->logPhiremockCommand($ip, $port, $debug, $expectationsPath, $phiremockPath); |
| 56 | 56 | $this->initProcess($ip, $port, $debug, $expectationsPath, $phiremockPath); |
| 57 | - $logFile = $logsPath . DIRECTORY_SEPARATOR . self::LOG_FILE_NAME; |
|
| 58 | - $this->process->start(function ($type, $buffer) use ($logFile) { |
|
| 57 | + $logFile = $logsPath.DIRECTORY_SEPARATOR.self::LOG_FILE_NAME; |
|
| 58 | + $this->process->start(function($type, $buffer) use ($logFile) { |
|
| 59 | 59 | file_put_contents($logFile, $buffer, FILE_APPEND); |
| 60 | 60 | }); |
| 61 | 61 | $this->setUpProcessCompatibility(); |
@@ -107,10 +107,10 @@ discard block |
||
| 107 | 107 | private function logPhiremockCommand($ip, $port, $debug, $expectationsPath, $phiremockPath) |
| 108 | 108 | { |
| 109 | 109 | if ($debug) { |
| 110 | - echo 'Running ' . $this->getCommandPrefix() |
|
| 110 | + echo 'Running '.$this->getCommandPrefix() |
|
| 111 | 111 | . "{$phiremockPath} -i {$ip} -p {$port}" |
| 112 | 112 | . ($debug ? ' -d' : '') |
| 113 | - . ($expectationsPath ? " -e {$expectationsPath}" : '') . PHP_EOL; |
|
| 113 | + . ($expectationsPath ? " -e {$expectationsPath}" : '').PHP_EOL; |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | array $options, |
| 61 | 61 | PhiremockProcess $process = null |
| 62 | 62 | ) { |
| 63 | - $this->config['bin_path'] = Config::projectDir() . '../vendor/bin/phiremock'; |
|
| 63 | + $this->config['bin_path'] = Config::projectDir().'../vendor/bin/phiremock'; |
|
| 64 | 64 | $this->config['logs_path'] = Config::logDir(); |
| 65 | 65 | $this->config['expectations_path'] = null; |
| 66 | 66 | |