dev/src/ReleaseBuilder/ReleaseBuilder.php
private function mergeCommitIntoRelease(array $release, array $commitRelease)
    {
        foreach ($commitRelease as $key => $commit) {
            if (!isset($release[$key])) {
                $release[$key] = [
                    'level' => $commit['level'],
                    'messages' => [$commit['message']]
                ];
            } else {
                $release[$key]['messages'][] = $commit['message'];
                $release[$key]['level'] = ($release[$key]['level'] >= $commit['level'])
                    ? $release[$key]['level']
                    : $commit['level'];
            }
        }

        return $release;
    }
private function mergeCommitIntoRelease(array $release, array $commitRelease)
    {
        foreach ($commitRelease as $key => $commit) {
            if (!isset($release[$key])) {
                $release[$key] = [
                    'level' => $commit['level'],
                    'messages' => [$commit['message']]
                ];
            } else {
                $release[$key]['messages'][] = $commit['message'];
                $release[$key]['level'] = ($release[$key]['level'] >= $commit['level'])
                    ? $release[$key]['level']
                    : $commit['level'];
            }
        }

        return $release;
    }
private function mergeCommitIntoRelease ( array $ release , array $ commitRelease ) { foreach ( $ commitRelease as $ key => $ commit ) { if ( ! isset ( $ release [ $ key ] ) ) { $ release [ $ key ] = [ 'level' => $ commit [ 'level' ] , 'messages' => [ $ commit [ 'message' ] ] ] ; } else { $ release [ $ key ] [ 'messages' ] [ ] = $ commit [ 'message' ] ; $ release [ $ key ] [ 'level' ] = ( $ release [ $ key ] [ 'level' ] >= $ commit [ 'level' ] ) ? $ release [ $ key ] [ 'level' ] : $ commit [ 'level' ] ; } } return $ release ; }
Interlace new commit release data into an existing release structure.

@param array $release An associative array, where the key is the
component ID and the value is structured data describing the
release.
@param array $commitRelease The release data generated for a single commit.
@return array $release
Interlace new commit release data into an existing release structure .