src/FactoryPhoto.php
private static function validateUrl(string $url): string
    {
        if (filter_var($url, FILTER_VALIDATE_URL) === false) {
            throw new \Exception("Invalid url : ${url}");
        }
        return $url;
    }
private static function validateUrl(string $url): string
    {
        if (filter_var($url, FILTER_VALIDATE_URL) === false) {
            throw new \Exception("Invalid url : ${url}");
        }
        return $url;
    }
Make Sure Url in string with correct url format
@throws \Exception