return $array;
} /**
* @param array<int|string, mixed> $values
*
* @return array<int|string, mixed>
*/
protected static function mapTranslatedTag(\DOMElement
$child, array
$values): array
{ if (!\
array_key_exists(self::
kebabCaseToCamelCase($child->tagName
),
$values)) { $values[self::
kebabCaseToCamelCase($child->tagName
)] =
[];
} // psalm would fail if it can't infer type from nested array
/** @var array<string, string> $tagValues */
$tagValues =
$values[self::
kebabCaseToCamelCase($child->tagName
)];
$tagValues[self::
getLocaleCodeFromElement($child)] =
trim($child->nodeValue ?? ''
);
$values[self::
kebabCaseToCamelCase($child->tagName
)] =
$tagValues;
return $values;
}