src/PHPDish/Bundle/ThemeBundle/Theming/ThemeFinder.php
private function convertScreenshotsArraysToScreenshotsObjects(array $screenshotsArrays): array
    {
        return array_map(function (array $screenshotArray) {
            if (!array_key_exists('path', $screenshotArray)) {
                throw new \InvalidArgumentException('Screenshot path is required.');
            }

            $themeScreenshot = new ThemeScreenshot($screenshotArray['path']);
            $themeScreenshot->setTitle($screenshotArray['title'] ?? null);
            $themeScreenshot->setDescription($screenshotArray['description'] ?? null);
            return $themeScreenshot;

        }, $screenshotsArrays);
    }
private function convertScreenshotsArraysToScreenshotsObjects(array $screenshotsArrays): array
    {
        return array_map(function (array $screenshotArray) {
            if (!array_key_exists('path', $screenshotArray)) {
                throw new \InvalidArgumentException('Screenshot path is required.');
            }

            $themeScreenshot = new ThemeScreenshot($screenshotArray['path']);
            $themeScreenshot->setTitle($screenshotArray['title'] ?? null);
            $themeScreenshot->setDescription($screenshotArray['description'] ?? null);
            return $themeScreenshot;

        }, $screenshotsArrays);
    }
@param array $screenshotsArrays

@return array|ThemeScreenshot[]