for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* @author Mike van Riel <[email protected]>
* @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @link http://phpdoc.org
*/
namespace phpDocumentor\Parser;
use phpDocumentor\Dsn;
final class FlySystemCollector implements FileCollector
{
* @var SpecificationFactoryInterface
private $specificationFactory;
* @var FlySystemFactory
private $flySystemFactory;
* FlySystemCollector constructor.
public function __construct(SpecificationFactoryInterface $specificationFactory, FlySystemFactory $flySystemFactory)
$this->specificationFactory = $specificationFactory;
$this->flySystemFactory = $flySystemFactory;
}
public function getFiles(Dsn $dsn, array $paths, array $ignore, array $extensions): array
$specs = $this->specificationFactory->create($paths, $ignore, $extensions);
$fileSystem = $this->flySystemFactory->create($dsn);
$files = [];
foreach ($fileSystem->find($specs) as $file) {
$files[] = new FlySystemFile($fileSystem, $file['path']);
return $files;