Code Duplication    Length = 2-2 lines in 3 locations

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

@@ 1881-1882 (lines=2) @@
1878
                            foreach( $optparamvalue as $part ) {
1879
                                $part = str_replace( 'MAILTO:', '', $part );
1880
                                $part = str_replace( 'mailto:', '', $part );
1881
                                if(( '"' == $part{0} ) && ( '"' == $part{strlen($part)-1} ))
1882
                                    $part = substr( $part, 1, ( strlen($part)-2 ));
1883
                                $optarrays[$optparamlabel][] = $part;
1884
                            }
1885
                        }
@@ 1889-1890 (lines=2) @@
1886
                        else {
1887
                            $part = str_replace( 'MAILTO:', '', $optparamvalue );
1888
                            $part = str_replace( 'mailto:', '', $part );
1889
                            if(( '"' == $part{0} ) && ( '"' == $part{strlen($part)-1} ))
1890
                                $part = substr( $part, 1, ( strlen($part)-2 ));
1891
                            $optarrays[$optparamlabel][] = $part;
1892
                        }
1893
                        break;
@@ 5469-5470 (lines=2) @@
5466
        foreach( $params as $paramKey => $paramValue ) {
5467
            if( is_array( $paramValue )) {
5468
                foreach( $paramValue as $pkey => $pValue ) {
5469
                    if(( '"' == substr( $pValue, 0, 1 )) && ( '"' == substr( $pValue, -1 )))
5470
                        $paramValue[$pkey] = substr( $pValue, 1, ( strlen( $pValue ) - 2 ));
5471
                }
5472
            }
5473
            elseif(( '"' == substr( $paramValue, 0, 1 )) && ( '"' == substr( $paramValue, -1 )))