Code Duplication    Length = 2-3 lines in 3 locations

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

@@ 1899-1901 (lines=3) @@
1896
                            $optparamvalue = str_replace( 'MAILTO:', '', $optparamvalue );
1897
                            $optparamvalue = str_replace( 'mailto:', '', $optparamvalue );
1898
                        }
1899
                        if(( '"' == substr( $optparamvalue, 0, 1 )) &&
1900
                            ( '"' == substr( $optparamvalue, -1 )))
1901
                            $optparamvalue = substr( $optparamvalue, 1, ( strlen( $optparamvalue ) - 2 ));
1902
                        $params2[$optparamlabel] = $optparamvalue;
1903
                        break;
1904
                } // end switch( $optparamlabel.. .
@@ 3225-3226 (lines=2) @@
3222
     */
3223
    function setRelatedTo( $value, $params=FALSE, $index=FALSE ) {
3224
        if( empty( $value )) if( $this->getConfig( 'allowEmpty' )) $value = null; else return FALSE;
3225
        if(( '<' == substr( $value, 0, 1 )) && ( '>' == substr( $value, -1 )))
3226
            $value = substr( $value, 1, ( strlen( $value ) - 2 ));
3227
        $this->_existRem( $params, 'RELTYPE', 'PARENT', TRUE ); // remove default
3228
        $this->_setMval( $this->relatedto, $value, $params, FALSE, $index );
3229
        return TRUE;
@@ 5473-5474 (lines=2) @@
5470
                        $paramValue[$pkey] = substr( $pValue, 1, ( strlen( $pValue ) - 2 ));
5471
                }
5472
            }
5473
            elseif(( '"' == substr( $paramValue, 0, 1 )) && ( '"' == substr( $paramValue, -1 )))
5474
                $paramValue = substr( $paramValue, 1, ( strlen( $paramValue ) - 2 ));
5475
            if( 'VALUE' == strtoupper( $paramKey ))
5476
                $input['VALUE']                 = strtoupper( $paramValue );
5477
            else