Neos.Diff/Classes/SequenceMatcher.php
private function tupleSort(array $a, array $b)
    {
        $max = max(count($a), count($b));
        for ($i = 0; $i < $max; ++$i) {
            if ($a[$i] < $b[$i]) {
                return -1;
            } else {
                if ($a[$i] > $b[$i]) {
                    return 1;
                }
            }
        }

        if (count($a) == count($b)) {
            return 0;
        } else {
            if (count($a) < count($b)) {
                return -1;
            } else {
                return 1;
            }
        }
    }
private function tupleSort(array $a, array $b)
    {
        $max = max(count($a), count($b));
        for ($i = 0; $i < $max; ++$i) {
            if ($a[$i] < $b[$i]) {
                return -1;
            } else {
                if ($a[$i] > $b[$i]) {
                    return 1;
                }
            }
        }

        if (count($a) == count($b)) {
            return 0;
        } else {
            if (count($a) < count($b)) {
                return -1;
            } else {
                return 1;
            }
        }
    }
private function tupleSort ( array $ a , array $ b ) { $ max = max ( count ( $ a ) , count ( $ b ) ) ; for ( $ i = 0 ; $ i < $ max ; ++ $ i ) { if ( $ a [ $ i ] < $ b [ $ i ] ) { return - 1 ; } else { if ( $ a [ $ i ] > $ b [ $ i ] ) { return 1 ; } } } if ( count ( $ a ) == count ( $ b ) ) { return 0 ; } else { if ( count ( $ a ) < count ( $ b ) ) { return - 1 ; } else { return 1 ; } } }
Sort an array by the nested arrays it contains. Helper function for getMatchingBlocks

@param array $a First array to compare.
@param array $b Second array to compare.
@return int -1, 0 or 1, as expected by the usort function.
Sort an array by the nested arrays it contains . Helper function for getMatchingBlocks