Crunz\Console\Command\ScheduleRunCommand::collectFiles PHP Method

collectFiles() protected method

Collect all task files
protected collectFiles ( string $source ) : Iterator
$source string
return Iterator
    protected function collectFiles($source)
    {
        if (!file_exists($source)) {
            return [];
        }
        $finder = new Finder();
        $iterator = $finder->files()->name('*' . $this->config('suffix'))->in($source);
        return $iterator;
    }