Skip to content

Commit

Permalink
fix php-file-iterator between versions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgmyr committed Aug 5, 2023
1 parent 69c6c1d commit 5d67f3c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/CLI/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ public function run(array $argv): int
return 0;
}

$files = (new Facade)->getFilesAsArray(
$arguments->directories(),
$arguments->suffixes(),
'',
$arguments->exclude()
);
$files = [];

Check warning on line 48 in src/CLI/Application.php

View check run for this annotation

Codecov / codecov/patch

src/CLI/Application.php#L48

Added line #L48 was not covered by tests

foreach ($arguments->directories() as $directory) {
$newFiles = (new Facade)->getFilesAsArray(
$directory,
$arguments->suffixes(),
'',
$arguments->exclude()
);
$files = $files + $newFiles;

Check warning on line 57 in src/CLI/Application.php

View check run for this annotation

Codecov / codecov/patch

src/CLI/Application.php#L50-L57

Added lines #L50 - L57 were not covered by tests
}

if (empty($files)) {
print 'No files found to scan' . PHP_EOL;
Expand Down

0 comments on commit 5d67f3c

Please sign in to comment.