public function getGroupedLines()
    {
        $result = array();
        $commit = null;
        $current = array();

        foreach ($this->getLines() as $lineNumber => $line) {
            if ($commit !== $line->getCommit()) {
                if (count($current)) {
                    $result[] = array($commit, $current);
                }
                $commit = $line->getCommit();
                $current = array();
            }

            $current[$lineNumber] = $line;
        }

        if (count($current)) {
            $result[] = array($commit, $current);
        }

        return $result;
    }
public function getGroupedLines()
    {
        $result = array();
        $commit = null;
        $current = array();

        foreach ($this->getLines() as $lineNumber => $line) {
            if ($commit !== $line->getCommit()) {
                if (count($current)) {
                    $result[] = array($commit, $current);
                }
                $commit = $line->getCommit();
                $current = array();
            }

            $current[$lineNumber] = $line;
        }

        if (count($current)) {
            $result[] = array($commit, $current);
        }

        return $result;
    }
public function getGroupedLines ( ) { $ result = array ( ) ; $ commit = null ; $ current = array ( ) ; foreach ( $ this -> getLines ( ) as $ lineNumber => $ line ) { if ( $ commit !== $ line -> getCommit ( ) ) { if ( count ( $ current ) ) { $ result [ ] = array ( $ commit , $ current ) ; } $ commit = $ line -> getCommit ( ) ; $ current = array ( ) ; } $ current [ $ lineNumber ] = $ line ; } if ( count ( $ current ) ) { $ result [ ] = array ( $ commit , $ current ) ; } return $ result ; }
Returns lines grouped by commit.

@return array a list of two-elements array (commit, lines)
Returns lines grouped by commit .