Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 1752-1763 (lines=12) @@
1749
     * @since 0.9.7 - 2006-11-23
1750
     * @return string
1751
     */
1752
    function createAttach() {
1753
        if( empty( $this->attach )) return FALSE;
1754
        $output       = null;
1755
        foreach( $this->attach as $attachPart ) {
1756
            if(! empty( $attachPart['value'] )) {
1757
                $attributes = $this->_createParams( $attachPart['params'] );
1758
                $output    .= $this->_createElement( 'ATTACH', $attributes, $attachPart['value'] );
1759
            }
1760
            elseif( $this->getConfig( 'allowEmpty' )) $output .= $this->_createElement( 'ATTACH' );
1761
        }
1762
        return $output;
1763
    }
1764
    /**
1765
     * set calendar component property attach
1766
     *
@@ 3689-3700 (lines=12) @@
3686
     * @since 2.4.8 - 2008-10-21
3687
     * @return string
3688
     */
3689
    function createTzname() {
3690
        if( empty( $this->tzname )) return FALSE;
3691
        $output = null;
3692
        foreach( $this->tzname as $theName ) {
3693
            if( !empty( $theName['value'] )) {
3694
                $attributes = $this->_createParams( $theName['params'], array( 'LANGUAGE' ));
3695
                $output    .= $this->_createElement( 'TZNAME', $attributes, $this->_strrep( $theName['value'] ));
3696
            }
3697
            elseif( $this->getConfig( 'allowEmpty' )) $output .= $this->_createElement( 'TZNAME' );
3698
        }
3699
        return $output;
3700
    }
3701
    /**
3702
     * set calendar component property tzname
3703
     *