$title = ChangelogSection::storefront->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getStorefront();
break;
case ChangelogSection::administration->name:
$title = ChangelogSection::administration->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getAdministration();
break;
case ChangelogSection::upgrade->name:
$title = ChangelogSection::upgrade->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getUpgradeInformation();
break;
case ChangelogSection::major->name:
$title = ChangelogSection::major->value;
$getContentFnc =
static fn (ChangelogDefinition
$definition): ?string =>
$definition->
getNextMajorVersionChanges();
break;
} $changes =
[];
foreach ($collection as $changelog) { $content =
$getContentFnc($changelog->
getDefinition());