Code Duplication    Length = 23-24 lines in 2 locations

lib/objects/ariadne_object.php 2 locations

@@ 1483-1506 (lines=24) @@
1480
					$arCallTemplateName = $function;
1481
					$arCallTemplateNLS = $this->reqnls;
1482
					break 2;
1483
				} else if (!$arSuperContext[$checkpath.":".$arType.":".$function] && ($arTemplate=$templates[$arType]['any'])) {
1484
					$arCallTemplate=$arType.".".$function.".any";
1485
					$arCallTemplateName = $function;
1486
					$arCallTemplateNLS = "any";
1487
					break 2;
1488
				} else {
1489
1490
					if (!($arSuper=$AR->superClass[$arType])) {
1491
						// no template found, no default.phtml found, try superclass.
1492
						if ($subcpos = strpos($arType, '.')) {
1493
							$arSuper = substr($arType, 0, $subcpos);
1494
						} else {
1495
							if (!class_exists($arType, false)) {
1496
								// the given class was not yet loaded, so do that now
1497
								$arTemp=$this->store->newobject('','',$arType,new object);
1498
							} else {
1499
								$arTemp=new $arType();
1500
							}
1501
							$arSuper=get_parent_class($arTemp);
1502
						}
1503
						$AR->superClass[$arType]=$arSuper;
1504
					}
1505
					$arType=$arSuper;
1506
				}
1507
			}
1508
		}
1509
@@ 1696-1718 (lines=23) @@
1693
					$arCallTemplate=$arType.".".$arCallFunction.".".$this->reqnls;
1694
					$arCallTemplateName = $arCallFunction;
1695
					$arCallTemplateNLS = $this->reqnls;
1696
				} else if (!$arSuperContext[$checkpath.":".$arType.":".$arCallFunction] && ($arTemplateId=$curr_templates[$arType][$arCallFunction]['any'])) {
1697
					$arCallTemplate=$arType.".".$arCallFunction.".any";
1698
					$arCallTemplateName = $arCallFunction;
1699
					$arCallTemplateNLS = 'any';
1700
				} else {
1701
1702
					if (!($arSuper=$AR->superClass[$arType])) {
1703
						// no template found, no default.phtml found, try superclass.
1704
						if ($subcpos = strpos($arType, '.')) {
1705
							$arSuper = substr($arType, 0, $subcpos);
1706
						} else {
1707
							if (!class_exists($arType, false )) {
1708
								// the given class was not yet loaded, so do that now
1709
								$arTemp=$this->store->newobject('','',$arType,new object);
1710
							} else {
1711
								$arTemp=new $arType();
1712
							}
1713
							$arSuper=get_parent_class($arTemp);
1714
						}
1715
						$AR->superClass[$arType]=$arSuper;
1716
					}
1717
					$arType=$arSuper;
1718
				}
1719
			}
1720
			if ($inLibrary) {
1721