From a171bec5f7bc447c32a58755f7126223482baff1 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 13 Oct 2024 19:29:00 +0200 Subject: [PATCH] remove usless filterfonts method close #438 --- app/class/Servicefont.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/class/Servicefont.php b/app/class/Servicefont.php index 80718c8f..bb375024 100644 --- a/app/class/Servicefont.php +++ b/app/class/Servicefont.php @@ -21,24 +21,9 @@ public function __construct(Modelmedia $mediamanager) $this->mediamanager = $mediamanager; $mediaopt = new Mediaopt(['path' => Model::FONT_DIR, 'type' => [Media::FONT]]); $medias = $this->mediamanager->medialistopt($mediaopt); - $medias = $this->filterfonts($medias); $this->fonts = $this->groupfonts($medias); } - /** - * Remove all non-font Media from a list of Media objects - * - * @param Media[] $medias List of Media objects - * - * @return Media[] Filtered list, containting only font files - */ - protected function filterfonts(array $medias): array - { - return array_filter($medias, function (Media $media) { - return $media->type() === Media::FONT; - }); - } - /** * This will group the media by filename *