diff options
author | Andrew Dolgov <[email protected]> | 2022-03-22 12:24:31 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-03-22 12:24:31 +0300 |
commit | 1c4f7ab3b838b23afb2ee4dab14acbf75956e952 (patch) | |
tree | 0a19274107d717efe92d2c0376cd3105fead5a11 /vendor/phar-io/manifest/src/exceptions | |
parent | 711662948768492e8d05b778a7d80eacaec368d2 (diff) |
* add phpunit as a dev dependency
* add some basic tests for UrlHelper::rewrite_relative()
* fix UrlHelper::rewrite_relative() to work better on non-absolute
relative URL paths
Diffstat (limited to 'vendor/phar-io/manifest/src/exceptions')
10 files changed, 131 insertions, 0 deletions
diff --git a/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php new file mode 100644 index 000000000..766fc0e6a --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ElementCollectionException.php @@ -0,0 +1,13 @@ +<?php declare(strict_types = 1); +/* + * This file is part of PharIo\Manifest. + * + * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Manifest; + +class ElementCollectionException extends \InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/Exception.php b/vendor/phar-io/manifest/src/exceptions/Exception.php new file mode 100644 index 000000000..e7f122097 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/Exception.php @@ -0,0 +1,13 @@ +<?php declare(strict_types = 1); +/* + * This file is part of PharIo\Manifest. + * + * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Manifest; + +interface Exception extends \Throwable { +} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php new file mode 100644 index 000000000..952901eb5 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php @@ -0,0 +1,14 @@ +<?php declare(strict_types = 1); +/* + * This file is part of PharIo\Manifest. + * + * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Manifest; + +class InvalidApplicationNameException extends \InvalidArgumentException implements Exception { + public const InvalidFormat = 2; +} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php new file mode 100644 index 000000000..3cbe08223 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/InvalidEmailException.php @@ -0,0 +1,13 @@ +<?php declare(strict_types = 1); +/* + * This file is part of PharIo\Manifest. + * + * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Manifest; + +class InvalidEmailException extends \InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php new file mode 100644 index 000000000..8f77e2946 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/InvalidUrlException.php @@ -0,0 +1,13 @@ +<?php declare(strict_types = 1); +/* + * This file is part of PharIo\Manifest. + * + * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Manifest; + +class InvalidUrlException extends \InvalidArgumentException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php new file mode 100644 index 000000000..cf1c314c6 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentException.php @@ -0,0 +1,5 @@ +<?php declare(strict_types = 1); +namespace PharIo\Manifest; + +class ManifestDocumentException extends \RuntimeException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php new file mode 100644 index 000000000..4676e3546 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php @@ -0,0 +1,45 @@ +<?php declare(strict_types = 1); +/* + * This file is part of PharIo\Manifest. + * + * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PharIo\Manifest; + +use LibXMLError; + +class ManifestDocumentLoadingException extends \Exception implements Exception { + /** @var LibXMLError[] */ + private $libxmlErrors; + + /** + * ManifestDocumentLoadingException constructor. + * + * @param LibXMLError[] $libxmlErrors + */ + public function __construct(array $libxmlErrors) { + $this->libxmlErrors = $libxmlErrors; + $first = $this->libxmlErrors[0]; + + parent::__construct( + \sprintf( + '%s (Line: %d / Column: %d / File: %s)', + $first->message, + $first->line, + $first->column, + $first->file + ), + $first->code + ); + } + + /** + * @return LibXMLError[] + */ + public function getLibxmlErrors(): array { + return $this->libxmlErrors; + } +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php new file mode 100644 index 000000000..43373bd34 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php @@ -0,0 +1,5 @@ +<?php declare(strict_types = 1); +namespace PharIo\Manifest; + +class ManifestDocumentMapperException extends \RuntimeException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php new file mode 100644 index 000000000..a4e772369 --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestElementException.php @@ -0,0 +1,5 @@ +<?php declare(strict_types = 1); +namespace PharIo\Manifest; + +class ManifestElementException extends \RuntimeException implements Exception { +} diff --git a/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php new file mode 100644 index 000000000..df0971edc --- /dev/null +++ b/vendor/phar-io/manifest/src/exceptions/ManifestLoaderException.php @@ -0,0 +1,5 @@ +<?php declare(strict_types = 1); +namespace PharIo\Manifest; + +class ManifestLoaderException extends \Exception implements Exception { +} |