Code Duplication    Length = 6-6 lines in 2 locations

src/config/LdmlConfigHandler.class.php 2 locations

@@ 504-509 (lines=6) @@
501
                                        throw new AgaviException('unknown child content in dateTimeFormatLength tag');
502
                                    }
503
                                } elseif ($item->getName() == 'availableFormats') {
504
                                    foreach ($item as $dateFormatItem) {
505
                                        if ($dateFormatItem->getName() != 'dateFormatItem') {
506
                                            throw new AgaviException('unknown childtag "' . $dateFormatItem->getName() . '" in availableFormats tag');
507
                                        }
508
                                        $data['calendars'][$calendarName]['dateTimeFormats']['availableFormats'][$dateFormatItem->getAttribute('id')] = $this->unescape($dateFormatItem->getValue(), true);
509
                                    }
510
                                } elseif ($item->getName() == 'appendItems') {
511
                                    foreach ($item as $appendItem) {
512
                                        if ($appendItem->getName() != 'appendItem') {
@@ 511-516 (lines=6) @@
508
                                        $data['calendars'][$calendarName]['dateTimeFormats']['availableFormats'][$dateFormatItem->getAttribute('id')] = $this->unescape($dateFormatItem->getValue(), true);
509
                                    }
510
                                } elseif ($item->getName() == 'appendItems') {
511
                                    foreach ($item as $appendItem) {
512
                                        if ($appendItem->getName() != 'appendItem') {
513
                                            throw new AgaviException('unknown childtag "' . $appendItem->getName() . '" in appendItems tag');
514
                                        }
515
                                        $data['calendars'][$calendarName]['dateTimeFormats']['appendItems'][$appendItem->getAttribute('request')] = $this->unescape($appendItem->getValue(), true);
516
                                    }
517
                                } elseif ($item->getName() != 'default') {
518
                                    throw new AgaviException('unknown childtag "' . $item->getName() . '" in dateTimeFormats tag');
519
                                }