Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit efc0f8f

Browse files
vyskocilpavelBaranekD
authored andcommitted
fix: store a full attribute object from RPC
1 parent 18dc026 commit efc0f8f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/AdapterRpc.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -685,14 +685,14 @@ private function getAttributes($perunAttrs, $attrNamesMap)
685685

686686
foreach ($perunAttrs as $perunAttr) {
687687
$perunAttrName = $perunAttr['namespace'] . ':' . $perunAttr['friendlyName'];
688-
$attributes[$attrNamesMap[$perunAttrName]] = [
689-
'id' => $perunAttr['id'],
690-
'name' => $attrNamesMap[$perunAttrName],
691-
'displayName' => $perunAttr['displayName'],
692-
'type' => $perunAttr['type'],
693-
'value' => $perunAttr['value'],
694-
'friendlyName' => $perunAttr['friendlyName'],
695-
];
688+
$attribute = [];
689+
foreach (array_keys($perunAttr) as $key) {
690+
$attribute[$key] = $perunAttr[$key];
691+
}
692+
693+
$attribute['name'] = $attrNamesMap[$perunAttrName];
694+
$attributes[$attrNamesMap[$perunAttrName]] = $attribute;
695+
696696
}
697697

698698
return $attributes;

0 commit comments

Comments
 (0)