Code Duplication    Length = 4-4 lines in 15 locations

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

@@ 6019-6022 (lines=4) @@
6016
            case 'ACTION':
6017
                if( !empty( $this->action['value'] )) return ( $inclParam ) ? $this->action : $this->action['value'];
6018
                break;
6019
            case 'ATTACH':
6020
                if( !isset( $this->attach[$propix] )) return FALSE;
6021
                return ( $inclParam ) ? $this->attach[$propix] : $this->attach[$propix]['value'];
6022
                break;
6023
            case 'ATTENDEE':
6024
                if( !isset( $this->attendee[$propix] )) return FALSE;
6025
                return ( $inclParam ) ? $this->attendee[$propix] : $this->attendee[$propix]['value'];
@@ 6023-6026 (lines=4) @@
6020
                if( !isset( $this->attach[$propix] )) return FALSE;
6021
                return ( $inclParam ) ? $this->attach[$propix] : $this->attach[$propix]['value'];
6022
                break;
6023
            case 'ATTENDEE':
6024
                if( !isset( $this->attendee[$propix] )) return FALSE;
6025
                return ( $inclParam ) ? $this->attendee[$propix] : $this->attendee[$propix]['value'];
6026
                break;
6027
            case 'CATEGORIES':
6028
                if( !isset( $this->categories[$propix] )) return FALSE;
6029
                return ( $inclParam ) ? $this->categories[$propix] : $this->categories[$propix]['value'];
@@ 6027-6030 (lines=4) @@
6024
                if( !isset( $this->attendee[$propix] )) return FALSE;
6025
                return ( $inclParam ) ? $this->attendee[$propix] : $this->attendee[$propix]['value'];
6026
                break;
6027
            case 'CATEGORIES':
6028
                if( !isset( $this->categories[$propix] )) return FALSE;
6029
                return ( $inclParam ) ? $this->categories[$propix] : $this->categories[$propix]['value'];
6030
                break;
6031
            case 'CLASS':
6032
                if( !empty( $this->class['value'] )) return ( $inclParam ) ? $this->class : $this->class['value'];
6033
                break;
@@ 6034-6037 (lines=4) @@
6031
            case 'CLASS':
6032
                if( !empty( $this->class['value'] )) return ( $inclParam ) ? $this->class : $this->class['value'];
6033
                break;
6034
            case 'COMMENT':
6035
                if( !isset( $this->comment[$propix] )) return FALSE;
6036
                return ( $inclParam ) ? $this->comment[$propix] : $this->comment[$propix]['value'];
6037
                break;
6038
            case 'COMPLETED':
6039
                if( !empty( $this->completed['value'] )) return ( $inclParam ) ? $this->completed : $this->completed['value'];
6040
                break;
@@ 6041-6044 (lines=4) @@
6038
            case 'COMPLETED':
6039
                if( !empty( $this->completed['value'] )) return ( $inclParam ) ? $this->completed : $this->completed['value'];
6040
                break;
6041
            case 'CONTACT':
6042
                if( !isset( $this->contact[$propix] )) return FALSE;
6043
                return ( $inclParam ) ? $this->contact[$propix] : $this->contact[$propix]['value'];
6044
                break;
6045
            case 'CREATED':
6046
                if( !empty( $this->created['value'] )) return ( $inclParam ) ? $this->created : $this->created['value'];
6047
                break;
@@ 6048-6051 (lines=4) @@
6045
            case 'CREATED':
6046
                if( !empty( $this->created['value'] )) return ( $inclParam ) ? $this->created : $this->created['value'];
6047
                break;
6048
            case 'DESCRIPTION':
6049
                if( !isset( $this->description[$propix] )) return FALSE;
6050
                return ( $inclParam ) ? $this->description[$propix] : $this->description[$propix]['value'];
6051
                break;
6052
            case 'DTEND':
6053
                if( !empty( $this->dtend['value'] )) return ( $inclParam ) ? $this->dtend : $this->dtend['value'];
6054
                break;
@@ 6073-6076 (lines=4) @@
6070
                $value = ( $specform ) ? $this->duration2date() : $this->duration['value'];
6071
                return ( $inclParam ) ? array( 'value' => $value, 'params' =>  $this->duration['params'] ) : $value;
6072
                break;
6073
            case 'EXDATE':
6074
                if( !isset( $this->exdate[$propix] )) return FALSE;
6075
                return ( $inclParam ) ? $this->exdate[$propix] : $this->exdate[$propix]['value'];
6076
                break;
6077
            case 'EXRULE':
6078
                if( !isset( $this->exrule[$propix] )) return FALSE;
6079
                return ( $inclParam ) ? $this->exrule[$propix] : $this->exrule[$propix]['value'];
@@ 6077-6080 (lines=4) @@
6074
                if( !isset( $this->exdate[$propix] )) return FALSE;
6075
                return ( $inclParam ) ? $this->exdate[$propix] : $this->exdate[$propix]['value'];
6076
                break;
6077
            case 'EXRULE':
6078
                if( !isset( $this->exrule[$propix] )) return FALSE;
6079
                return ( $inclParam ) ? $this->exrule[$propix] : $this->exrule[$propix]['value'];
6080
                break;
6081
            case 'FREEBUSY':
6082
                if( !isset( $this->freebusy[$propix] )) return FALSE;
6083
                return ( $inclParam ) ? $this->freebusy[$propix] : $this->freebusy[$propix]['value'];
@@ 6081-6084 (lines=4) @@
6078
                if( !isset( $this->exrule[$propix] )) return FALSE;
6079
                return ( $inclParam ) ? $this->exrule[$propix] : $this->exrule[$propix]['value'];
6080
                break;
6081
            case 'FREEBUSY':
6082
                if( !isset( $this->freebusy[$propix] )) return FALSE;
6083
                return ( $inclParam ) ? $this->freebusy[$propix] : $this->freebusy[$propix]['value'];
6084
                break;
6085
            case 'GEO':
6086
                if( !empty( $this->geo['value'] )) return ( $inclParam ) ? $this->geo : $this->geo['value'];
6087
                break;
@@ 6103-6106 (lines=4) @@
6100
            case 'PRIORITY':
6101
                if( !empty( $this->priority['value'] )) return ( $inclParam ) ? $this->priority : $this->priority['value'];
6102
                break;
6103
            case 'RDATE':
6104
                if( !isset( $this->rdate[$propix] )) return FALSE;
6105
                return ( $inclParam ) ? $this->rdate[$propix] : $this->rdate[$propix]['value'];
6106
                break;
6107
            case 'RECURRENCE-ID':
6108
                if( !empty( $this->recurrenceid['value'] )) return ( $inclParam ) ? $this->recurrenceid : $this->recurrenceid['value'];
6109
                break;
@@ 6110-6113 (lines=4) @@
6107
            case 'RECURRENCE-ID':
6108
                if( !empty( $this->recurrenceid['value'] )) return ( $inclParam ) ? $this->recurrenceid : $this->recurrenceid['value'];
6109
                break;
6110
            case 'RELATED-TO':
6111
                if( !isset( $this->relatedto[$propix] )) return FALSE;
6112
                return ( $inclParam ) ? $this->relatedto[$propix] : $this->relatedto[$propix]['value'];
6113
                break;
6114
            case 'REPEAT':
6115
                if( !empty( $this->repeat['value'] )) return ( $inclParam ) ? $this->repeat : $this->repeat['value'];
6116
                break;
@@ 6117-6120 (lines=4) @@
6114
            case 'REPEAT':
6115
                if( !empty( $this->repeat['value'] )) return ( $inclParam ) ? $this->repeat : $this->repeat['value'];
6116
                break;
6117
            case 'REQUEST-STATUS':
6118
                if( !isset( $this->requeststatus[$propix] )) return FALSE;
6119
                return ( $inclParam ) ? $this->requeststatus[$propix] : $this->requeststatus[$propix]['value'];
6120
                break;
6121
            case 'RESOURCES':
6122
                if( !isset( $this->resources[$propix] )) return FALSE;
6123
                return ( $inclParam ) ? $this->resources[$propix] : $this->resources[$propix]['value'];
@@ 6121-6124 (lines=4) @@
6118
                if( !isset( $this->requeststatus[$propix] )) return FALSE;
6119
                return ( $inclParam ) ? $this->requeststatus[$propix] : $this->requeststatus[$propix]['value'];
6120
                break;
6121
            case 'RESOURCES':
6122
                if( !isset( $this->resources[$propix] )) return FALSE;
6123
                return ( $inclParam ) ? $this->resources[$propix] : $this->resources[$propix]['value'];
6124
                break;
6125
            case 'RRULE':
6126
                if( !isset( $this->rrule[$propix] )) return FALSE;
6127
                return ( $inclParam ) ? $this->rrule[$propix] : $this->rrule[$propix]['value'];
@@ 6125-6128 (lines=4) @@
6122
                if( !isset( $this->resources[$propix] )) return FALSE;
6123
                return ( $inclParam ) ? $this->resources[$propix] : $this->resources[$propix]['value'];
6124
                break;
6125
            case 'RRULE':
6126
                if( !isset( $this->rrule[$propix] )) return FALSE;
6127
                return ( $inclParam ) ? $this->rrule[$propix] : $this->rrule[$propix]['value'];
6128
                break;
6129
            case 'SEQUENCE':
6130
                if( !empty( $this->sequence['value'] )) return ( $inclParam ) ? $this->sequence : $this->sequence['value'];
6131
                break;
@@ 6147-6150 (lines=4) @@
6144
            case 'TZID':
6145
                if( !empty( $this->tzid['value'] )) return ( $inclParam ) ? $this->tzid : $this->tzid['value'];
6146
                break;
6147
            case 'TZNAME':
6148
                if( !isset( $this->tzname[$propix] )) return FALSE;
6149
                return ( $inclParam ) ? $this->tzname[$propix] : $this->tzname[$propix]['value'];
6150
                break;
6151
            case 'TZOFFSETFROM':
6152
                if( !empty( $this->tzoffsetfrom['value'] )) return ( $inclParam ) ? $this->tzoffsetfrom : $this->tzoffsetfrom['value'];
6153
                break;