This should also work:

```php
$files = Finder::create()
    ->files()
    ->name("*.{$extension}")
    ->in($this->dirs);

return iterator_to_array($files);
```