xprt64/cqrs-es

View on GitHub
src/Dudulina/CodeGeneration/Lib/DirectoriesToIterator.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * Copyright (c) 2018 Constantin Galbenu <xprt64@gmail.com>
 */

declare(strict_types=1);

namespace Dudulina\CodeGeneration\Lib;

class DirectoriesToIterator extends \AppendIterator
{
    public function __construct(array $directories)
    {
        parent::__construct();
        foreach ($directories as $folder) {
            $this->append(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($folder)));
        }
    }
}