private function prepareCommitCollection(
        GitRepository $git,
        array $logList,
        array &$commitCollection,
        array &$filePathMapping,
        array &$filePathCollection
    ) {
        foreach ($logList as $log) {
            $currentCacheId = \md5(__FUNCTION__ . $log['commit']);
            if ($this->cachePool->has($currentCacheId)) {
                $fromCurrentCache = $this->cachePool->get($currentCacheId);

                $commitCollection   = \array_merge($filePathMapping, $fromCurrentCache['commitCollection']);
                $filePathMapping    = \array_merge($filePathMapping, $fromCurrentCache['filePathMapping']);
                $filePathCollection = \array_merge($filePathCollection, $fromCurrentCache['filePathCollection']);

                break;
            }

            $matches = $this->matchFileInformation($this->fetchNameStatusFromCommit($log['commit'], $git));
            if (!\count($matches)) {
                continue;
            }

            $changeCollection = [];
            foreach ($matches as $match) {
                $changeCollection[] = \array_filter(\array_filter($match), 'is_string', ARRAY_FILTER_USE_KEY);
            }

            $this->prepareChangeCollection(
                $log,
                $changeCollection,
                $commitCollection,
                $filePathMapping,
                $filePathCollection
            );
        }
    }
private function prepareCommitCollection(
        GitRepository $git,
        array $logList,
        array &$commitCollection,
        array &$filePathMapping,
        array &$filePathCollection
    ) {
        foreach ($logList as $log) {
            $currentCacheId = \md5(__FUNCTION__ . $log['commit']);
            if ($this->cachePool->has($currentCacheId)) {
                $fromCurrentCache = $this->cachePool->get($currentCacheId);

                $commitCollection   = \array_merge($filePathMapping, $fromCurrentCache['commitCollection']);
                $filePathMapping    = \array_merge($filePathMapping, $fromCurrentCache['filePathMapping']);
                $filePathCollection = \array_merge($filePathCollection, $fromCurrentCache['filePathCollection']);

                break;
            }

            $matches = $this->matchFileInformation($this->fetchNameStatusFromCommit($log['commit'], $git));
            if (!\count($matches)) {
                continue;
            }

            $changeCollection = [];
            foreach ($matches as $match) {
                $changeCollection[] = \array_filter(\array_filter($match), 'is_string', ARRAY_FILTER_USE_KEY);
            }

            $this->prepareChangeCollection(
                $log,
                $changeCollection,
                $commitCollection,
                $filePathMapping,
                $filePathCollection
            );
        }
    }
private function prepareCommitCollection ( GitRepository $ git , array $ logList , array & $ commitCollection , array & $ filePathMapping , array & $ filePathCollection ) { foreach ( $ logList as $ log ) { $ currentCacheId = \ md5 ( __FUNCTION__ . $ log [ 'commit' ] ) ; if ( $ this -> cachePool -> has ( $ currentCacheId ) ) { $ fromCurrentCache = $ this -> cachePool -> get ( $ currentCacheId ) ; $ commitCollection = \ array_merge ( $ filePathMapping , $ fromCurrentCache [ 'commitCollection' ] ) ; $ filePathMapping = \ array_merge ( $ filePathMapping , $ fromCurrentCache [ 'filePathMapping' ] ) ; $ filePathCollection = \ array_merge ( $ filePathCollection , $ fromCurrentCache [ 'filePathCollection' ] ) ; break ; } $ matches = $ this -> matchFileInformation ( $ this -> fetchNameStatusFromCommit ( $ log [ 'commit' ] , $ git ) ) ; if ( ! \ count ( $ matches ) ) { continue ; } $ changeCollection = [ ] ; foreach ( $ matches as $ match ) { $ changeCollection [ ] = \ array_filter ( \ array_filter ( $ match ) , 'is_string' , ARRAY_FILTER_USE_KEY ) ; } $ this -> prepareChangeCollection ( $ log , $ changeCollection , $ commitCollection , $ filePathMapping , $ filePathCollection ) ; } }
Prepare the collection of commits from the git log.

@param GitRepository $git                The git repository.
@param array         $logList            The collection of commits from the git log.
@param array         $commitCollection   The commit collection.
@param array         $filePathMapping    The file path mapping.
@param array         $filePathCollection The file path collection.

@return void
Prepare the collection of commits from the git log .