Skip to content

Commit

Permalink
Merge pull request #8 from sclable/hotfix/empty-pattern
Browse files Browse the repository at this point in the history
Hotfix/empty pattern
  • Loading branch information
m-bymike committed Dec 3, 2015
2 parents 2dba4fa + cb7e50f commit 7fc5d79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Sclable XML Lint - Changelog
============================

0.2.1
-----

* fix a bug where patterns were empty

0.2.0
-----

Expand Down
5 changes: 3 additions & 2 deletions src/php/console/command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ private function lintDir($dir)
$finder->files()
->in($dir);

if ($this->input->hasOption(self::OPTION_PATTERN)) {
$patterns = explode(',', $this->input->getOption(self::OPTION_PATTERN));
$patterns = $this->input->getOption(self::OPTION_PATTERN);
if (!empty($patterns)) {
$patterns = explode(',', $patterns);
foreach ($patterns as $pattern) {
$finder->name(trim($pattern));
}
Expand Down

0 comments on commit 7fc5d79

Please sign in to comment.