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