fix: files should always be ignored as they cannot be Instances

This commit is contained in:
norb 2025-02-11 08:14:07 +01:00
commit 905e9113c4

View file

@ -28,9 +28,15 @@ class InstanceIterator extends \FilesystemIterator
public function current()
{
// skip files
while (! parent::current()->isDir()) {
parent::next();
}
if (!isset($this->instance)) {
$this->instance = new Instance(parent::current());
}
// var_dump($this);
return $this->instance;
}
@ -40,4 +46,4 @@ class InstanceIterator extends \FilesystemIterator
$this->instance = null;
parent::next();
}
}
}