Skip to content

Commit 340b9ed

Browse files
committed
[Finder] Make method calls explicit in ExcludeDirectoryFilterIterator
1 parent 38665c9 commit 340b9ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Iterator/ExcludeDirectoryFilterIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ public function __construct(\Iterator $iterator, array $directories)
7272
*/
7373
public function accept(): bool
7474
{
75-
if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
75+
if ($this->isRecursive && isset($this->excludedDirs[$this->current()->getFilename()]) && $this->current()->isDir()) {
7676
return false;
7777
}
7878

7979
if ($this->excludedPattern) {
80-
$path = $this->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
80+
$path = $this->current()->isDir() ? $this->current()->getRelativePathname() : $this->current()->getRelativePath();
8181
$path = str_replace('\\', '/', $path);
8282

8383
return !preg_match($this->excludedPattern, $path);

0 commit comments

Comments
 (0)