Code Duplication    Length = 7-7 lines in 2 locations

main/inc/lib/icalcreator/iCalcreator.class.php 2 locations

@@ 1174-1180 (lines=7) @@
1171
            $d = $b->duration2date();
1172
        if(     empty( $c ))                               return -1;
1173
        elseif( empty( $d ))                               return  1;
1174
        foreach( $this->_sortkeys as $key ) {
1175
            if    ( !isset( $c[$key] ))                      return -1;
1176
            elseif( !isset( $d[$key] ))                      return  1;
1177
            if    (         $c[$key] == $d[$key] )           continue;
1178
            if    ((  (int) $c[$key] ) < ((int) $d[$key]))   return -1;
1179
            elseif((  (int) $c[$key] ) > ((int) $d[$key]))   return  1;
1180
        }
1181
        if( isset( $a->created['value'] ))
1182
            $e = & $a->created['value'];
1183
        else
@@ 1189-1195 (lines=7) @@
1186
            $f = & $b->created['value'];
1187
        else
1188
            $f = & $b->dtstamp['value'];
1189
        foreach( $this->_sortkeys as $key ) {
1190
            if(       !isset( $e[$key] ))                    return -1;
1191
            elseif(   !isset( $f[$key] ))                    return  1;
1192
            if    (           $e[$key] == $f[$key] )         continue;
1193
            if    ((    (int) $e[$key] ) < ((int) $f[$key])) return -1;
1194
            elseif((    (int) $e[$key] ) > ((int) $f[$key])) return  1;
1195
        }
1196
        if    ((            $a->uid['value'] ) <
1197
            (            $b->uid['value'] ))            return -1;
1198
        elseif((            $a->uid['value'] ) >