diff options
author | Andrew Dolgov <[email protected]> | 2022-07-24 14:03:04 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-07-24 14:03:04 +0300 |
commit | 5006c754c42a09f5b88b258c2da4b9eff7508357 (patch) | |
tree | 841425d4e163d746642d70b8ac0df381343bbf2b /plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions | |
parent | f7b3c50828d4604ac5999daf3c3405e65c877e2f (diff) |
readability: add missing dependencies
Diffstat (limited to 'plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions')
4 files changed, 106 insertions, 0 deletions
diff --git a/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php new file mode 100644 index 000000000..0105b2dad --- /dev/null +++ b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php @@ -0,0 +1,20 @@ +<?php + +/** + * League.Uri (https://uri.thephpleague.com) + * + * (c) Ignace Nyamagana Butera <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Contracts\UriException; + +class FileinfoSupportMissing extends \RuntimeException implements UriException +{ +} diff --git a/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php new file mode 100644 index 000000000..8ff3b538c --- /dev/null +++ b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php @@ -0,0 +1,20 @@ +<?php + +/** + * League.Uri (https://uri.thephpleague.com) + * + * (c) Ignace Nyamagana Butera <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Contracts\UriException; + +class IdnSupportMissing extends \RuntimeException implements UriException +{ +} diff --git a/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php new file mode 100644 index 000000000..80259f3ba --- /dev/null +++ b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php @@ -0,0 +1,46 @@ +<?php + +/** + * League.Uri (https://uri.thephpleague.com) + * + * (c) Ignace Nyamagana Butera <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Idna\IdnaInfo; + +final class IdnaConversionFailed extends SyntaxError +{ + /** @var IdnaInfo|null */ + private $idnaInfo; + + private function __construct(string $message, IdnaInfo $idnaInfo = null) + { + parent::__construct($message); + $this->idnaInfo = $idnaInfo; + } + + public static function dueToIDNAError(string $domain, IdnaInfo $idnaInfo): self + { + return new self( + 'The host `'.$domain.'` is invalid : '.implode(', ', $idnaInfo->errorList()).' .', + $idnaInfo + ); + } + + public static function dueToInvalidHost(string $domain): self + { + return new self('The host `'.$domain.'` is not a valid IDN host'); + } + + public function idnaInfo(): ?IdnaInfo + { + return $this->idnaInfo; + } +} diff --git a/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php new file mode 100644 index 000000000..1b5e4cbd8 --- /dev/null +++ b/plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php @@ -0,0 +1,20 @@ +<?php + +/** + * League.Uri (https://uri.thephpleague.com) + * + * (c) Ignace Nyamagana Butera <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace League\Uri\Exceptions; + +use League\Uri\Contracts\UriException; + +class SyntaxError extends \InvalidArgumentException implements UriException +{ +} |