private function prepareChangeCollection(
        array $commit,
        array $changeCollection,
        array &$commitCollection,
        array &$filePathMapping,
        array &$filePathCollection
    ) {
        foreach ($changeCollection as $change) {
            if (!isset($commit['containedPath'])) {
                $commit['containedPath'] = [];
            }

            if (!isset($commit['information'])) {
                $commit['information'] = [];
            }

            if (isset($change['criteria'])) {
                $changeToHash   = \md5($change['to']);
                $changeFromHash = \md5($change['from']);

                $commit['containedPath'][$changeToHash] = $change['to'];
                $commit['information'][$changeToHash]   = $change;

                $filePathMapping[$changeToHash]   = $change['to'];
                $filePathMapping[$changeFromHash] = $change['from'];

                $filePathCollection[$changeToHash]['commits'][$commit['commit']]   = $commit;
                $filePathCollection[$changeFromHash]['commits'][$commit['commit']] = $commit;

                $commitCollection[$commit['commit']] = $commit;

                continue;
            }

            $fileHash = \md5($change['file']);

            $commit['containedPath'][$fileHash] = $change['file'];
            $commit['information'][$fileHash]   = $change;

            $filePathMapping[$fileHash] = $change['file'];

            $filePathCollection[$fileHash]['commits'][$commit['commit']] = $commit;

            $commitCollection[$commit['commit']] = $commit;
        }
    }
private function prepareChangeCollection(
        array $commit,
        array $changeCollection,
        array &$commitCollection,
        array &$filePathMapping,
        array &$filePathCollection
    ) {
        foreach ($changeCollection as $change) {
            if (!isset($commit['containedPath'])) {
                $commit['containedPath'] = [];
            }

            if (!isset($commit['information'])) {
                $commit['information'] = [];
            }

            if (isset($change['criteria'])) {
                $changeToHash   = \md5($change['to']);
                $changeFromHash = \md5($change['from']);

                $commit['containedPath'][$changeToHash] = $change['to'];
                $commit['information'][$changeToHash]   = $change;

                $filePathMapping[$changeToHash]   = $change['to'];
                $filePathMapping[$changeFromHash] = $change['from'];

                $filePathCollection[$changeToHash]['commits'][$commit['commit']]   = $commit;
                $filePathCollection[$changeFromHash]['commits'][$commit['commit']] = $commit;

                $commitCollection[$commit['commit']] = $commit;

                continue;
            }

            $fileHash = \md5($change['file']);

            $commit['containedPath'][$fileHash] = $change['file'];
            $commit['information'][$fileHash]   = $change;

            $filePathMapping[$fileHash] = $change['file'];

            $filePathCollection[$fileHash]['commits'][$commit['commit']] = $commit;

            $commitCollection[$commit['commit']] = $commit;
        }
    }
private function prepareChangeCollection ( array $ commit , array $ changeCollection , array & $ commitCollection , array & $ filePathMapping , array & $ filePathCollection ) { foreach ( $ changeCollection as $ change ) { if ( ! isset ( $ commit [ 'containedPath' ] ) ) { $ commit [ 'containedPath' ] = [ ] ; } if ( ! isset ( $ commit [ 'information' ] ) ) { $ commit [ 'information' ] = [ ] ; } if ( isset ( $ change [ 'criteria' ] ) ) { $ changeToHash = \ md5 ( $ change [ 'to' ] ) ; $ changeFromHash = \ md5 ( $ change [ 'from' ] ) ; $ commit [ 'containedPath' ] [ $ changeToHash ] = $ change [ 'to' ] ; $ commit [ 'information' ] [ $ changeToHash ] = $ change ; $ filePathMapping [ $ changeToHash ] = $ change [ 'to' ] ; $ filePathMapping [ $ changeFromHash ] = $ change [ 'from' ] ; $ filePathCollection [ $ changeToHash ] [ 'commits' ] [ $ commit [ 'commit' ] ] = $ commit ; $ filePathCollection [ $ changeFromHash ] [ 'commits' ] [ $ commit [ 'commit' ] ] = $ commit ; $ commitCollection [ $ commit [ 'commit' ] ] = $ commit ; continue ; } $ fileHash = \ md5 ( $ change [ 'file' ] ) ; $ commit [ 'containedPath' ] [ $ fileHash ] = $ change [ 'file' ] ; $ commit [ 'information' ] [ $ fileHash ] = $ change ; $ filePathMapping [ $ fileHash ] = $ change [ 'file' ] ; $ filePathCollection [ $ fileHash ] [ 'commits' ] [ $ commit [ 'commit' ] ] = $ commit ; $ commitCollection [ $ commit [ 'commit' ] ] = $ commit ; } }
Prepare the collection for commit, file path mapping and the file path.

@param array $commit             The commit information.
@param array $changeCollection   The change collection.
@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 for commit file path mapping and the file path .