Skip to content

Commit

Permalink
Fix validator's getFiles() directory check.
Browse files Browse the repository at this point in the history
  • Loading branch information
sepehr committed Jan 21, 2017
1 parent 3c1069d commit 1374b6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ComplianceValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ public function validate($lines)
public function getFiles($root = null)
{
$root = $root ?: __DIR__ . '/../../../../';
$root = realpath($root);

if ($this->files == null) {
$files = scandir($root);
foreach ($files as $i => $file) {
if (is_dir($file)) {
if (is_dir("$root/$file")) {
$files[$i] .= "/";
}
}
Expand Down

0 comments on commit 1374b6c

Please sign in to comment.