Initial Commit

This commit is contained in:
David Stone
2024-11-30 18:24:12 -07:00
commit e8f7955c1c
5432 changed files with 1397750 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions;
use Exception;
use WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate\HostDoesNotExist;
use WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate\NoCertificateInstalled;
use WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate\UnknownError;
class CouldNotDownloadCertificate extends Exception
{
public static function hostDoesNotExist(string $hostName) : self
{
return new HostDoesNotExist($hostName);
}
public static function noCertificateInstalled(string $hostName) : self
{
return new NoCertificateInstalled($hostName);
}
public static function unknownError(string $hostName, string $errorMessage) : self
{
return new UnknownError($hostName, $errorMessage);
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate;
use WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate;
class HostDoesNotExist extends CouldNotDownloadCertificate
{
public function __construct(string $hostName)
{
parent::__construct("The host named `{$hostName}` does not exist.");
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate;
use WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate;
class NoCertificateInstalled extends CouldNotDownloadCertificate
{
public function __construct(string $hostName)
{
parent::__construct("Could not find a certificate on host named `{$hostName}`.");
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate;
use WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate;
class UnknownError extends CouldNotDownloadCertificate
{
public function __construct(string $hostName, string $errorMessage)
{
parent::__construct("Could not download certificate for host `{$hostName}` because {$errorMessage}");
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions;
use Exception;
class InvalidIpAddress extends Exception
{
public static function couldNotValidate(string $ipAddress) : self
{
return new static("String `{$ipAddress}` is not a valid IP address.");
}
}

View File

@@ -0,0 +1,16 @@
<?php
namespace WP_Ultimo\Dependencies\Spatie\SslCertificate\Exceptions;
use Exception;
class InvalidUrl extends Exception
{
public static function couldNotValidate(string $url) : self
{
return new static("String `{$url}` is not a valid url.");
}
public static function couldNotDetermineHost(string $url) : self
{
return new static("Could not determine host from url `{$url}`.");
}
}