Skip to content

Commit 26ac15b

Browse files
simplified creation of initial file list when detecting dupes
1 parent e8a3784 commit 26ac15b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/QafooLabs/Refactoring/Domain/Model/Directory.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ function ($file) use ($workingDirectory) {
7474
);
7575
}
7676

77-
$files = array();
78-
foreach ($iterator as $filename => $file) {
79-
$files[] = $file;
80-
}
81-
77+
$files = iterator_to_array($iterator);
8278
return new StandardCallbackFilterIterator($iterator, function($file, $filename) use ($files) {
8379
return !in_array($filename, $files);
8480
});

0 commit comments

Comments
 (0)