private function getElements(\DOMElement
$xml): array
{ $elements =
[];
$count = 0;
/** @var \DOMElement $element */
foreach (static::
getAllChildren($xml) as $element) { $nodeName =
$element->nodeName;
if ($nodeName === 'title' ||
$nodeName === 'name' ||
$nodeName === 'flag'
) { continue;
} $elements[$count] =
$this->
elementToArray($element);
++
$count;
} return $elements;
} private function getCardName(\DOMElement
$element): ?string
{ foreach ($element->
getElementsByTagName('name'
) as $name) { $parentNode =
$name->parentNode;
if (($parentNode !== null
) &&
$parentNode->nodeName !== 'card'
) {