Skip to content

Commit

Permalink
Fix configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Oct 31, 2016
1 parent fa52373 commit 2fef65c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ protected function mergeOptions()
if (!empty($options['configuration'])) {
$this->output->writeln("<comment>Loaded config from \"{$options['configuration']}\"</comment>\n");
$config = $this->loadConfiguration($options['configuration']);
} else {
$this->output->writeln("<comment>No config file loaded.</comment>\n");
}
} else {
$this->output->writeln("<comment>No config file loaded.</comment>\n");
}

$options = array_merge($this->defaults, array_filter($config), array_filter($options));
Expand All @@ -270,7 +274,7 @@ protected function getConfigFile()
$dir = './';

if (count($inputPath) == 1 && $first = reset($inputPath)) {
$dir = is_dir($first) ? : dirname($first);
$dir = is_dir($first) ? $first : dirname($first);
}

$filename = rtrim($dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.phplint.yml';
Expand Down

0 comments on commit 2fef65c

Please sign in to comment.