Skip to content

Commit

Permalink
Simplify with mapInto
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni committed Jul 18, 2024
1 parent bedbbe4 commit e4d13fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sitemaps/SitemapRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ public function collectionSitemaps(): Collection
{
return CollectionFacade::all()
->filter(IsEnabledModel::handle(...))
->map(fn ($collection) => new CollectionSitemap($collection))
->mapInto(CollectionSitemap::class)
->values();
}

public function taxonomySitemaps(): Collection
{
return Taxonomy::all()
->filter(IsEnabledModel::handle(...))
->map(fn ($taxonomy) => new TaxonomySitemap($taxonomy))
->mapInto(TaxonomySitemap::class)
->values();
}

Expand Down

0 comments on commit e4d13fe

Please sign in to comment.