aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib/LibXMLException.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-12-04 10:25:11 +0000
committerMario <mario@mariovavti.com>2019-12-04 10:25:11 +0000
commitbde429cff649237984903a252ba1a718e6d74f53 (patch)
treeb2b2570159cfb37689e6ce3b96c3b1b988d676cc /vendor/sabre/xml/lib/LibXMLException.php
parentcc9f41df5f83bcab435d6fb941b5a8f5b1457037 (diff)
parent4c8d33d1eb2a804aa70a7bc677d6c73d0d94816b (diff)
downloadvolse-hubzilla-4.6.tar.gz
volse-hubzilla-4.6.tar.bz2
volse-hubzilla-4.6.zip
Merge branch '4.6RC'4.6
Diffstat (limited to 'vendor/sabre/xml/lib/LibXMLException.php')
-rw-r--r--vendor/sabre/xml/lib/LibXMLException.php35
1 files changed, 16 insertions, 19 deletions
diff --git a/vendor/sabre/xml/lib/LibXMLException.php b/vendor/sabre/xml/lib/LibXMLException.php
index f0190eb51..4701c304a 100644
--- a/vendor/sabre/xml/lib/LibXMLException.php
+++ b/vendor/sabre/xml/lib/LibXMLException.php
@@ -1,9 +1,11 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\Xml;
-use
- LibXMLError;
+use LibXMLError;
+use Throwable;
/**
* This exception is thrown when the Readers runs into a parsing error.
@@ -14,12 +16,12 @@ use
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class LibXMLException extends ParseException {
-
+class LibXMLException extends ParseException
+{
/**
* The error list.
*
- * @var LibXMLError[]
+ * @var []LibXMLError
*/
protected $errors;
@@ -28,26 +30,21 @@ class LibXMLException extends ParseException {
*
* You should pass a list of LibXMLError objects in its constructor.
*
- * @param LibXMLError[] $errors
- * @param int $code
- * @param Exception $previousException
+ * @param []LibXMLError $errors
+ * @param int $code
+ * @param Throwable $previousException
*/
- function __construct(array $errors, $code = null, Exception $previousException = null) {
-
+ public function __construct(array $errors, int $code = 0, Throwable $previousException = null)
+ {
$this->errors = $errors;
- parent::__construct($errors[0]->message . ' on line ' . $errors[0]->line . ', column ' . $errors[0]->column, $code, $previousException);
-
+ parent::__construct($errors[0]->message.' on line '.$errors[0]->line.', column '.$errors[0]->column, $code, $previousException);
}
/**
- * Returns the LibXML errors
- *
- * @return void
+ * Returns the LibXML errors.
*/
- function getErrors() {
-
+ public function getErrors(): array
+ {
return $this->errors;
-
}
-
}