/**
* Pick a good singular name.
*/
private function getSingularName(PrototypedArrayNode
$node): string
{ $name =
$node->
getName();
if (!
str_ends_with($name, 's'
)) { return $name;
} $parent =
$node->
getParent();
$mappings =
$parent instanceof ArrayNode ?
$parent->
getXmlRemappings() :
[];
foreach ($mappings as $map) { if ($map[1
] ===
$name) { $name =
$map[0
];
break;
} } return $name;
} private function buildToArray(ClassBuilder
$class): void
{