mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
setup: phpstan level 2
setup: phpstan level 2
This commit is contained in:
@@ -230,6 +230,7 @@ class XMLDataLoader
|
||||
} else {
|
||||
$iDstObj = (int)($oSubNode);
|
||||
// Attempt to find the object in the list of loaded objects
|
||||
/** @var \Combodo\iTop\Core\AttributeDefinition\AttributeExternalKey $oAttDef */
|
||||
$iExtKey = $this->GetObjectKey($oAttDef->GetTargetClass(), $iDstObj);
|
||||
if ($iExtKey == 0) {
|
||||
$iExtKey = -$iDstObj; // Convention: Unresolved keys are stored as negative !
|
||||
@@ -356,6 +357,7 @@ class XMLDataLoader
|
||||
$iExtKey = -1;
|
||||
foreach (MetaModel::ListAttributeDefs($sClass) as $sAttCode => $oAttDef) {
|
||||
if (($oAttDef->IsExternalKey()) && ($oTargetObj->Get($sAttCode) < 0)) { // Convention unresolved key = negative
|
||||
/** @var \Combodo\iTop\Core\AttributeDefinition\AttributeExternalKey $oAttDef */
|
||||
$sTargetClass = $oAttDef->GetTargetClass();
|
||||
$iTempKey = $oTargetObj->Get($sAttCode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user