Code Duplication    Length = 2-2 lines in 2 locations

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

@@ 586-587 (lines=2) @@
583
            case 'DIRECTORY':
584
                $value   = trim( $value );
585
                $nl      = $this->getConfig('delimiter');
586
                if( $nl == substr( $value, ( 0 - strlen( $nl ))))
587
                    $value = substr( $value, 0, ( strlen( $value ) - strlen( $nl )));
588
                if( is_dir( $value )) {
589
                    /* local directory */
590
                    clearstatcache();
@@ 1269-1270 (lines=2) @@
1266
        foreach( $rows as $line ) {
1267
            if( '' == trim( $line ))
1268
                continue;
1269
            if( $nl == substr( $line, 0 - strlen( $nl )))
1270
                $line = substr( $line, 0, ( strlen( $line ) - strlen( $nl ))).'\n';
1271
            if( 'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) {
1272
                $calsync++;
1273
                continue;