From 5006c754c42a09f5b88b258c2da4b9eff7508357 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 24 Jul 2022 14:03:04 +0300 Subject: readability: add missing dependencies --- .../src/Exceptions/FileinfoSupportMissing.php | 20 ++++++++++ .../src/Exceptions/IdnSupportMissing.php | 20 ++++++++++ .../src/Exceptions/IdnaConversionFailed.php | 46 ++++++++++++++++++++++ .../uri-interfaces/src/Exceptions/SyntaxError.php | 20 ++++++++++ 4 files changed, 106 insertions(+) create mode 100644 plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/FileinfoSupportMissing.php create mode 100644 plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnSupportMissing.php create mode 100644 plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/IdnaConversionFailed.php create mode 100644 plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions/SyntaxError.php (limited to 'plugins/af_readability/vendor/league/uri-interfaces/src/Exceptions') 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 @@ + + * + * 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 @@ + + * + * 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 @@ + + * + * 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 @@ + + * + * 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 +{ +} -- cgit v1.2.3