Code Duplication    Length = 11-12 lines in 3 locations

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

@@ 123-133 (lines=11) @@
120
     * @since 2.4.8 - 2008-10-21
121
     * @return string
122
     */
123
    function createCalscale() {
124
        if( empty( $this->calscale )) return FALSE;
125
        switch( $this->format ) {
126
            case 'xcal':
127
                return ' calscale="'.$this->calscale.'"'.$this->nl;
128
                break;
129
            default:
130
                return 'CALSCALE:'.$this->calscale.$this->nl;
131
                break;
132
        }
133
    }
134
    /**
135
     * set calendar property calscale
136
     *
@@ 157-167 (lines=11) @@
154
     * @since 0.9.7 - 2006-11-20
155
     * @return string
156
     */
157
    function createMethod() {
158
        if( empty( $this->method )) return FALSE;
159
        switch( $this->format ) {
160
            case 'xcal':
161
                return ' method="'.$this->method.'"'.$this->nl;
162
                break;
163
            default:
164
                return 'METHOD:'.$this->method.$this->nl;
165
                break;
166
        }
167
    }
168
    /**
169
     * set calendar property method
170
     *
@@ 248-259 (lines=12) @@
245
     * @since 0.9.7 - 2006-11-20
246
     * @return string
247
     */
248
    function createVersion() {
249
        if( empty( $this->version ))
250
            $this->_makeVersion();
251
        switch( $this->format ) {
252
            case 'xcal':
253
                return ' version="'.$this->version.'"'.$this->nl;
254
                break;
255
            default:
256
                return 'VERSION:'.$this->version.$this->nl;
257
                break;
258
        }
259
    }
260
    /**
261
     * set default calendar version
262
     *