Code Duplication    Length = 15-17 lines in 2 locations

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

@@ 490-504 (lines=15) @@
487
            case 'ALLOWEMPTY':
488
                return $this->allowEmpty;
489
                break;
490
            case 'COMPSINFO':
491
                unset( $this->compix );
492
                $info = array();
493
                foreach( $this->components as $cix => $component ) {
494
                    if( empty( $component )) continue;
495
                    unset( $component->propix );
496
                    $info[$cix]['ordno'] = $cix + 1;
497
                    $info[$cix]['type']  = $component->objName;
498
                    $info[$cix]['uid']   = $component->getProperty( 'uid' );
499
                    $info[$cix]['props'] = $component->getConfig( 'propinfo' );
500
                    $info[$cix]['sub']   = $component->getConfig( 'compsinfo' );
501
                    unset( $component->propix );
502
                }
503
                return $info;
504
                break;
505
            case 'DELIMITER':
506
                return $this->delimiter;
507
                break;
@@ 5573-5589 (lines=17) @@
5570
            case 'ALLOWEMPTY':
5571
                return $this->allowEmpty;
5572
                break;
5573
            case 'COMPSINFO':
5574
                unset( $this->compix );
5575
                $info = array();
5576
                if( isset( $this->components )) {
5577
                    foreach( $this->components as $cix => $component ) {
5578
                        if( empty( $component )) continue;
5579
                        unset( $component->propix );
5580
                        $info[$cix]['ordno'] = $cix + 1;
5581
                        $info[$cix]['type']  = $component->objName;
5582
                        $info[$cix]['uid']   = $component->getProperty( 'uid' );
5583
                        $info[$cix]['props'] = $component->getConfig( 'propinfo' );
5584
                        $info[$cix]['sub']   = $component->getConfig( 'compsinfo' );
5585
                        unset( $component->propix );
5586
                    }
5587
                }
5588
                return $info;
5589
                break;
5590
            case 'FORMAT':
5591
                return $this->format;
5592
                break;