public function process(
        FileCollection $filesCollection,
        ProcessFactory $processFactory,
        int $numberOfParallelJobs
    ): Collection {
        $this->filesCollection = $filesCollection;
        $this->processFactory = $processFactory;
        $this->runningProcesses = new Collection;
        $this->completedProcessesArray = [];
        while ($filesCollection->hasFiles() || $this->runningProcesses->count()) {
            $this->getProcessResults($numberOfParallelJobs);
        }
        return new Collection($this->completedProcessesArray);
    }
public function process(
        FileCollection $filesCollection,
        ProcessFactory $processFactory,
        int $numberOfParallelJobs
    ): Collection {
        $this->filesCollection = $filesCollection;
        $this->processFactory = $processFactory;
        $this->runningProcesses = new Collection;
        $this->completedProcessesArray = [];
        while ($filesCollection->hasFiles() || $this->runningProcesses->count()) {
            $this->getProcessResults($numberOfParallelJobs);
        }
        return new Collection($this->completedProcessesArray);
    }
public function process ( FileCollection $ filesCollection , ProcessFactory $ processFactory , int $ numberOfParallelJobs ) : Collection { $ this -> filesCollection = $ filesCollection ; $ this -> processFactory = $ processFactory ; $ this -> runningProcesses = new Collection ; $ this -> completedProcessesArray = [ ] ; while ( $ filesCollection -> hasFiles ( ) || $ this -> runningProcesses -> count ( ) ) { $ this -> getProcessResults ( $ numberOfParallelJobs ) ; } return new Collection ( $ this -> completedProcessesArray ) ; }
Run the processes to gather information.
@param FileCollection $filesCollection      Collection of files.
@param ProcessFactory $processFactory       Process Factory.
@param integer        $numberOfParallelJobs Number of parallel jobs to run.
@return Collection
Run the processes to gather information .