Skip to content

Commit

Permalink
Fix a precedence issue whee supplying your own ConfigLoader to the Ba…
Browse files Browse the repository at this point in the history
…sicResolver resulted in a WindowsConfigLoader being instantiated instead.
  • Loading branch information
Robert Goldsmith authored and kelunik committed Aug 9, 2017
1 parent 44cef3f commit 4005ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/BasicResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ final class BasicResolver implements Resolver {

public function __construct(Cache $cache = null, ConfigLoader $configLoader = null) {
$this->cache = $cache ?? new ArrayCache;
$this->configLoader = $configLoader ?? \stripos(PHP_OS, "win") === 0
$this->configLoader = $configLoader ?? (\stripos(PHP_OS, "win") === 0
? new WindowsConfigLoader
: new UnixConfigLoader;
: new UnixConfigLoader);

$this->questionFactory = new QuestionFactory;

Expand Down

0 comments on commit 4005ff4

Please sign in to comment.