private function exportByRequestedSection(array
$output, ChangelogFileCollection
$collection, string
$section): array
{ $getContentFnc =
static fn (ChangelogDefinition
$definition): ?string => null;
$title = '';
switch ($section) { case ChangelogSection::core->name:
$title = ChangelogSection::core->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getCore();
break;
case ChangelogSection::api->name:
$title = ChangelogSection::api->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getApi();
break;
case ChangelogSection::storefront->name:
$title = ChangelogSection::storefront->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getStorefront();