Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
format change
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Aug 30, 2014
1 parent 1695f85 commit 3fd6120
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
reportFile: script/coveralls.json
service: travis-ci
reportFile:
output: script/coveralls.json
repositoryDirectory: .
7 changes: 4 additions & 3 deletions spec/fixtures/coveralls.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
reportFile: coveralls.json
repositoryDirectory: ./../../
service: travis-ci
token:
service: travis-ci
reportFile:
output: coveralls.json
repositoryDirectory: ./../../
7 changes: 4 additions & 3 deletions spec/fixtures/coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
reportFile: coveralls.json
repositoryDirectory: /../../
service: travis-ci
token:
service: travis-ci
reportFile:
output: coveralls.json
repositoryDirectory: /../../
9 changes: 6 additions & 3 deletions src/ConfigurationLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@ public function loadFromFile($file)
/**
* @return Configuration
* @throws FileNotFoundException
* FIXME use ZendConfig?
*/
private function loadFromYamlFile()
{

$attributes = [];
$values = Yaml::parse($this->filePath);

if (isset($values['reportFile'])) {
$attributes['reportFile'] = $this->resolvePath($values['reportFile']);
$repotFile = $values['reportFile'];

if (isset($repotFile['output'])) {
$attributes['reportFile'] = $this->resolvePath($repotFile['output']);
}
}

if (isset($values['token'])) {
Expand All @@ -80,7 +84,6 @@ private function loadFromYamlFile()
$path = $values['repositoryDirectory'];
$attributes['repository'] = $this->repositoryFromPath($path);
}

return new Configuration($attributes);
}

Expand Down

0 comments on commit 3fd6120

Please sign in to comment.