src/fs/directory/Hasher.php
protected function createIterator()
    {
        $options = \RecursiveDirectoryIterator::SKIP_DOTS;
        $iterator = new \RecursiveDirectoryIterator($this->dir, $options);
        $options = \RecursiveIteratorIterator::SELF_FIRST;
        return new \RecursiveIteratorIterator($iterator, $options);
    }
protected function createIterator()
    {
        $options = \RecursiveDirectoryIterator::SKIP_DOTS;
        $iterator = new \RecursiveDirectoryIterator($this->dir, $options);
        $options = \RecursiveIteratorIterator::SELF_FIRST;
        return new \RecursiveIteratorIterator($iterator, $options);
    }
Create an iterator for looping over files
Return type hint excluded for mocking in tests