Code Duplication    Length = 6-6 lines in 23 locations

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

@@ 5737-5742 (lines=6) @@
5734
        }
5735
        $return = FALSE;
5736
        switch( $propName ) {
5737
            case 'ACTION':
5738
                if( !empty( $this->action )) {
5739
                    $this->action = '';
5740
                    $return = TRUE;
5741
                }
5742
                break;
5743
            case 'ATTACH':
5744
                return $this->deletePropertyM( $this->attach, $propix );
5745
                break;
@@ 5752-5757 (lines=6) @@
5749
            case 'CATEGORIES':
5750
                return $this->deletePropertyM( $this->categories, $propix );
5751
                break;
5752
            case 'CLASS':
5753
                if( !empty( $this->class )) {
5754
                    $this->class = '';
5755
                    $return = TRUE;
5756
                }
5757
                break;
5758
            case 'COMMENT':
5759
                return $this->deletePropertyM( $this->comment, $propix );
5760
                break;
@@ 5761-5766 (lines=6) @@
5758
            case 'COMMENT':
5759
                return $this->deletePropertyM( $this->comment, $propix );
5760
                break;
5761
            case 'COMPLETED':
5762
                if( !empty( $this->completed )) {
5763
                    $this->completed = '';
5764
                    $return = TRUE;
5765
                }
5766
                break;
5767
            case 'CONTACT':
5768
                return $this->deletePropertyM( $this->contact, $propix );
5769
                break;
@@ 5770-5775 (lines=6) @@
5767
            case 'CONTACT':
5768
                return $this->deletePropertyM( $this->contact, $propix );
5769
                break;
5770
            case 'CREATED':
5771
                if( !empty( $this->created )) {
5772
                    $this->created = '';
5773
                    $return = TRUE;
5774
                }
5775
                break;
5776
            case 'DESCRIPTION':
5777
                return $this->deletePropertyM( $this->description, $propix );
5778
                break;
@@ 5779-5784 (lines=6) @@
5776
            case 'DESCRIPTION':
5777
                return $this->deletePropertyM( $this->description, $propix );
5778
                break;
5779
            case 'DTEND':
5780
                if( !empty( $this->dtend )) {
5781
                    $this->dtend = '';
5782
                    $return = TRUE;
5783
                }
5784
                break;
5785
            case 'DTSTAMP':
5786
                if( in_array( $this->objName, array( 'valarm', 'vtimezone', 'standard', 'daylight' )))
5787
                    return FALSE;
@@ 5793-5798 (lines=6) @@
5790
                    $return = TRUE;
5791
                }
5792
                break;
5793
            case 'DTSTART':
5794
                if( !empty( $this->dtstart )) {
5795
                    $this->dtstart = '';
5796
                    $return = TRUE;
5797
                }
5798
                break;
5799
            case 'DUE':
5800
                if( !empty( $this->due )) {
5801
                    $this->due = '';
@@ 5799-5804 (lines=6) @@
5796
                    $return = TRUE;
5797
                }
5798
                break;
5799
            case 'DUE':
5800
                if( !empty( $this->due )) {
5801
                    $this->due = '';
5802
                    $return = TRUE;
5803
                }
5804
                break;
5805
            case 'DURATION':
5806
                if( !empty( $this->duration )) {
5807
                    $this->duration = '';
@@ 5805-5810 (lines=6) @@
5802
                    $return = TRUE;
5803
                }
5804
                break;
5805
            case 'DURATION':
5806
                if( !empty( $this->duration )) {
5807
                    $this->duration = '';
5808
                    $return = TRUE;
5809
                }
5810
                break;
5811
            case 'EXDATE':
5812
                return $this->deletePropertyM( $this->exdate, $propix );
5813
                break;
@@ 5820-5825 (lines=6) @@
5817
            case 'FREEBUSY':
5818
                return $this->deletePropertyM( $this->freebusy, $propix );
5819
                break;
5820
            case 'GEO':
5821
                if( !empty( $this->geo )) {
5822
                    $this->geo = '';
5823
                    $return = TRUE;
5824
                }
5825
                break;
5826
            case 'LAST-MODIFIED':
5827
                if( !empty( $this->lastmodified )) {
5828
                    $this->lastmodified = '';
@@ 5832-5837 (lines=6) @@
5829
                    $return = TRUE;
5830
                }
5831
                break;
5832
            case 'LOCATION':
5833
                if( !empty( $this->location )) {
5834
                    $this->location = '';
5835
                    $return = TRUE;
5836
                }
5837
                break;
5838
            case 'ORGANIZER':
5839
                if( !empty( $this->organizer )) {
5840
                    $this->organizer = '';
@@ 5838-5843 (lines=6) @@
5835
                    $return = TRUE;
5836
                }
5837
                break;
5838
            case 'ORGANIZER':
5839
                if( !empty( $this->organizer )) {
5840
                    $this->organizer = '';
5841
                    $return = TRUE;
5842
                }
5843
                break;
5844
            case 'PERCENT-COMPLETE':
5845
                if( !empty( $this->percentcomplete )) {
5846
                    $this->percentcomplete = '';
@@ 5850-5855 (lines=6) @@
5847
                    $return = TRUE;
5848
                }
5849
                break;
5850
            case 'PRIORITY':
5851
                if( !empty( $this->priority )) {
5852
                    $this->priority = '';
5853
                    $return = TRUE;
5854
                }
5855
                break;
5856
            case 'RDATE':
5857
                return $this->deletePropertyM( $this->rdate, $propix );
5858
                break;
@@ 5868-5873 (lines=6) @@
5865
            case 'RELATED-TO':
5866
                return $this->deletePropertyM( $this->relatedto, $propix );
5867
                break;
5868
            case 'REPEAT':
5869
                if( !empty( $this->repeat )) {
5870
                    $this->repeat = '';
5871
                    $return = TRUE;
5872
                }
5873
                break;
5874
            case 'REQUEST-STATUS':
5875
                return $this->deletePropertyM( $this->requeststatus, $propix );
5876
                break;
@@ 5883-5888 (lines=6) @@
5880
            case 'RRULE':
5881
                return $this->deletePropertyM( $this->rrule, $propix );
5882
                break;
5883
            case 'SEQUENCE':
5884
                if( !empty( $this->sequence )) {
5885
                    $this->sequence = '';
5886
                    $return = TRUE;
5887
                }
5888
                break;
5889
            case 'STATUS':
5890
                if( !empty( $this->status )) {
5891
                    $this->status = '';
@@ 5889-5894 (lines=6) @@
5886
                    $return = TRUE;
5887
                }
5888
                break;
5889
            case 'STATUS':
5890
                if( !empty( $this->status )) {
5891
                    $this->status = '';
5892
                    $return = TRUE;
5893
                }
5894
                break;
5895
            case 'SUMMARY':
5896
                if( !empty( $this->summary )) {
5897
                    $this->summary = '';
@@ 5895-5900 (lines=6) @@
5892
                    $return = TRUE;
5893
                }
5894
                break;
5895
            case 'SUMMARY':
5896
                if( !empty( $this->summary )) {
5897
                    $this->summary = '';
5898
                    $return = TRUE;
5899
                }
5900
                break;
5901
            case 'TRANSP':
5902
                if( !empty( $this->transp )) {
5903
                    $this->transp = '';
@@ 5901-5906 (lines=6) @@
5898
                    $return = TRUE;
5899
                }
5900
                break;
5901
            case 'TRANSP':
5902
                if( !empty( $this->transp )) {
5903
                    $this->transp = '';
5904
                    $return = TRUE;
5905
                }
5906
                break;
5907
            case 'TRIGGER':
5908
                if( !empty( $this->trigger )) {
5909
                    $this->trigger = '';
@@ 5907-5912 (lines=6) @@
5904
                    $return = TRUE;
5905
                }
5906
                break;
5907
            case 'TRIGGER':
5908
                if( !empty( $this->trigger )) {
5909
                    $this->trigger = '';
5910
                    $return = TRUE;
5911
                }
5912
                break;
5913
            case 'TZID':
5914
                if( !empty( $this->tzid )) {
5915
                    $this->tzid = '';
@@ 5913-5918 (lines=6) @@
5910
                    $return = TRUE;
5911
                }
5912
                break;
5913
            case 'TZID':
5914
                if( !empty( $this->tzid )) {
5915
                    $this->tzid = '';
5916
                    $return = TRUE;
5917
                }
5918
                break;
5919
            case 'TZNAME':
5920
                return $this->deletePropertyM( $this->tzname, $propix );
5921
                break;
@@ 5922-5927 (lines=6) @@
5919
            case 'TZNAME':
5920
                return $this->deletePropertyM( $this->tzname, $propix );
5921
                break;
5922
            case 'TZOFFSETFROM':
5923
                if( !empty( $this->tzoffsetfrom )) {
5924
                    $this->tzoffsetfrom = '';
5925
                    $return = TRUE;
5926
                }
5927
                break;
5928
            case 'TZOFFSETTO':
5929
                if( !empty( $this->tzoffsetto )) {
5930
                    $this->tzoffsetto = '';
@@ 5928-5933 (lines=6) @@
5925
                    $return = TRUE;
5926
                }
5927
                break;
5928
            case 'TZOFFSETTO':
5929
                if( !empty( $this->tzoffsetto )) {
5930
                    $this->tzoffsetto = '';
5931
                    $return = TRUE;
5932
                }
5933
                break;
5934
            case 'TZURL':
5935
                if( !empty( $this->tzurl )) {
5936
                    $this->tzurl = '';
@@ 5934-5939 (lines=6) @@
5931
                    $return = TRUE;
5932
                }
5933
                break;
5934
            case 'TZURL':
5935
                if( !empty( $this->tzurl )) {
5936
                    $this->tzurl = '';
5937
                    $return = TRUE;
5938
                }
5939
                break;
5940
            case 'UID':
5941
                if( in_array( $this->objName, array( 'valarm', 'vtimezone', 'standard', 'daylight' )))
5942
                    return FALSE;
@@ 5948-5953 (lines=6) @@
5945
                    $return = TRUE;
5946
                }
5947
                break;
5948
            case 'URL':
5949
                if( !empty( $this->url )) {
5950
                    $this->url = '';
5951
                    $return = TRUE;
5952
                }
5953
                break;
5954
            default:
5955
                $reduced = '';
5956
                if( $propName != 'X-PROP' ) {