Code Duplication    Length = 23-24 lines in 2 locations

lib/objects/ariadne_object.php 2 locations

@@ 1491-1514 (lines=24) @@
1488
					$arCallTemplateName = $function;
1489
					$arCallTemplateNLS = $this->reqnls;
1490
					break 2;
1491
				} else if (!$arSuperContext[$checkpath.":".$arType.":".$function] && ($arTemplate=$templates[$arType]['any'])) {
1492
					$arCallTemplate=$arType.".".$function.".any";
1493
					$arCallTemplateName = $function;
1494
					$arCallTemplateNLS = "any";
1495
					break 2;
1496
				} else {
1497
1498
					if (!($arSuper=$AR->superClass[$arType])) {
1499
						// no template found, no default.phtml found, try superclass.
1500
						if ($subcpos = strpos($arType, '.')) {
1501
							$arSuper = substr($arType, 0, $subcpos);
1502
						} else {
1503
							if (!class_exists($arType, false)) {
1504
								// the given class was not yet loaded, so do that now
1505
								$arTemp=$this->store->newobject('','',$arType,new object);
1506
							} else {
1507
								$arTemp=new $arType();
1508
							}
1509
							$arSuper=get_parent_class($arTemp);
1510
						}
1511
						$AR->superClass[$arType]=$arSuper;
1512
					}
1513
					$arType=$arSuper;
1514
				}
1515
			}
1516
		}
1517
@@ 1704-1726 (lines=23) @@
1701
					$arCallTemplate=$arType.".".$arCallFunction.".".$this->reqnls;
1702
					$arCallTemplateName = $arCallFunction;
1703
					$arCallTemplateNLS = $this->reqnls;
1704
				} else if (!$arSuperContext[$checkpath.":".$arType.":".$arCallFunction] && ($arTemplateId=$curr_templates[$arType][$arCallFunction]['any'])) {
1705
					$arCallTemplate=$arType.".".$arCallFunction.".any";
1706
					$arCallTemplateName = $arCallFunction;
1707
					$arCallTemplateNLS = 'any';
1708
				} else {
1709
1710
					if (!($arSuper=$AR->superClass[$arType])) {
1711
						// no template found, no default.phtml found, try superclass.
1712
						if ($subcpos = strpos($arType, '.')) {
1713
							$arSuper = substr($arType, 0, $subcpos);
1714
						} else {
1715
							if (!class_exists($arType, false )) {
1716
								// the given class was not yet loaded, so do that now
1717
								$arTemp=$this->store->newobject('','',$arType,new object);
1718
							} else {
1719
								$arTemp=new $arType();
1720
							}
1721
							$arSuper=get_parent_class($arTemp);
1722
						}
1723
						$AR->superClass[$arType]=$arSuper;
1724
					}
1725
					$arType=$arSuper;
1726
				}
1727
			}
1728
			if ($inLibrary) {
1729