Skip to content

Commit

Permalink
Generator writes config values to file
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jun 10, 2018
1 parent 509f7e2 commit 11f0ac2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public function __construct(array $argv) {
$this->checkArgs($argv);

array_shift($argv);
$this->filePath = array_shift($argv);
$suffix = array_shift($argv);
$this->filePath = "config.$suffix.ini";
$kvp = $this->splitKvp($argv);
$sectionList = $this->splitDotNotation($kvp);
$this->sectionData = $this->getSectionData($sectionList);
Expand Down Expand Up @@ -89,7 +90,7 @@ protected function getSectionData(array $sectionList):array {
$result = [];

foreach($sectionList as $sectionName => $data) {
$result[$sectionName] = new ConfigSection($sectionName, $data);
$result []= new ConfigSection($sectionName, $data);
}

return $result;
Expand Down

0 comments on commit 11f0ac2

Please sign in to comment.