Initial Commit
This commit is contained in:
23
dependencies/spatie/ssl-certificate/src/Exceptions/CouldNotDownloadCertificate.php
vendored
Normal file
23
dependencies/spatie/ssl-certificate/src/Exceptions/CouldNotDownloadCertificate.php
vendored
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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.");
|
||||
}
|
||||
}
|
||||
@@ -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}`.");
|
||||
}
|
||||
}
|
||||
12
dependencies/spatie/ssl-certificate/src/Exceptions/CouldNotDownloadCertificate/UnknownError.php
vendored
Normal file
12
dependencies/spatie/ssl-certificate/src/Exceptions/CouldNotDownloadCertificate/UnknownError.php
vendored
Normal 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}");
|
||||
}
|
||||
}
|
||||
12
dependencies/spatie/ssl-certificate/src/Exceptions/InvalidIpAddress.php
vendored
Normal file
12
dependencies/spatie/ssl-certificate/src/Exceptions/InvalidIpAddress.php
vendored
Normal 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.");
|
||||
}
|
||||
}
|
||||
16
dependencies/spatie/ssl-certificate/src/Exceptions/InvalidUrl.php
vendored
Normal file
16
dependencies/spatie/ssl-certificate/src/Exceptions/InvalidUrl.php
vendored
Normal 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}`.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user