Skip to content

Commit

Permalink
Small code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mcustiel committed Aug 29, 2020
1 parent 532e40a commit 7dea4d4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Extension/Phiremock.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ class Phiremock extends CodeceptionExtension

/** @var array */
protected $config = [
'listen' => '0.0.0.0:' . self::DEFAULT_PORT,
'debug' => false,
'start_delay' => 0,
'listen' => '0.0.0.0:' . self::DEFAULT_PORT,
'debug' => false,
'start_delay' => 0,
'bin_path' => self::DEFAULT_PATH,
'expectations_path' => null,
];

/** @var PhiremockProcess */
Expand All @@ -57,7 +59,7 @@ public function __construct(
array $options,
PhiremockProcess $process = null
) {
$this->setDefaults();
$this->setDefaultLogsPath();
parent::__construct($config, $options);

$this->initProcess($process);
Expand Down Expand Up @@ -102,11 +104,9 @@ private function initProcess(?PhiremockProcess $process): void
$this->process = $process ?? new PhiremockProcess();
}

private function setDefaults(): void
private function setDefaultLogsPath(): void
{
$this->config['bin_path'] = self::DEFAULT_PATH;
$this->config['logs_path'] = Config::logDir();
$this->config['expectations_path'] = null;
}

private function getPathFromCodeceptionDir($path): string
Expand Down

0 comments on commit 7dea4d4

Please sign in to comment.