Service/Account/Balance/Calc.php
private function getAssetTypes($typeIds, $typeCodes)
    {
        $result = [];
        $types = $this->daoTypeAsset->get();
        if (
            empty($typeIds) &&
            empty($typeCodes)
        ) {
            /* return all asset types */
            /** @var ETypeAsset $type */
            foreach ($types as $type) {
                $typeId = $type->getId();
                $typeCode = $type->getCode();
                $result[$typeId] = $typeCode;
            }
        } else {
            /* validate ID for given type ID or convert type code to type ID */
            /** @var ETypeAsset $type */
            foreach ($types as $type) {
                $typeId = $type->getId();
                $typeCode = $type->getCode();
                if (
                    (is_array($typeIds) && in_array($typeId, $typeIds)) ||
                    (is_array($typeCodes) && in_array($typeCode, $typeCodes))
                ) {
                    $result[$typeId] = $typeCode;
                }
            }
        }
        return $result;
    }
private function getAssetTypes($typeIds, $typeCodes)
    {
        $result = [];
        $types = $this->daoTypeAsset->get();
        if (
            empty($typeIds) &&
            empty($typeCodes)
        ) {
            /* return all asset types */
            /** @var ETypeAsset $type */
            foreach ($types as $type) {
                $typeId = $type->getId();
                $typeCode = $type->getCode();
                $result[$typeId] = $typeCode;
            }
        } else {
            /* validate ID for given type ID or convert type code to type ID */
            /** @var ETypeAsset $type */
            foreach ($types as $type) {
                $typeId = $type->getId();
                $typeCode = $type->getCode();
                if (
                    (is_array($typeIds) && in_array($typeId, $typeIds)) ||
                    (is_array($typeCodes) && in_array($typeCode, $typeCodes))
                ) {
                    $result[$typeId] = $typeCode;
                }
            }
        }
        return $result;
    }
Validate given asset type or get all types.

@param int[] $typeIds
@param string[] $typeCodes
@return array [id => code]