Server : LiteSpeed System : Linux server335.web-hosting.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : cardxfeb ( 2452) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/cardxfeb/public_html/vendor/spatie/crawler/src/Exceptions/ |
<?php
namespace Spatie\Crawler\Exceptions;
use Exception;
use Psr\Http\Message\UriInterface;
use Spatie\Crawler\CrawlUrl;
class InvalidUrl extends Exception
{
public static function unexpectedType(mixed $url): static
{
$crawlUrlClass = CrawlUrl::class;
$uriInterfaceClass = UriInterface::class;
$givenUrlClass = is_object($url) ? get_class($url) : gettype($url);
return new static("You passed an invalid url of type `{$givenUrlClass}`. This should be either a {$crawlUrlClass} or `{$uriInterfaceClass}`");
}
}