aboutsummaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/lib/Exceptions
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
committerwn_ <invalid@email.com>2024-12-09 17:58:28 +0000
commitf6a8facfd4bfc40025c069eebc37094d826aff58 (patch)
tree871aab0d8adafe736d954cae1783c260699c0ec3 /vendor/thecodingmachine/safe/lib/Exceptions
parentcd2c10f9f71409df24fc74c1bbd7d5ddbf48d991 (diff)
Bump 'spomky-labs/otphp' to 11.3.x.
This is mainly for PHP 8.4 compatibility.
Diffstat (limited to 'vendor/thecodingmachine/safe/lib/Exceptions')
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php15
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php12
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php12
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php21
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php9
-rw-r--r--vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php11
6 files changed, 0 insertions, 80 deletions
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
deleted file mode 100644
index 3401b57b8..000000000
--- a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-
-namespace Safe\Exceptions;
-
-class CurlException extends \Exception implements SafeExceptionInterface
-{
- /**
- * @param \CurlHandle $ch
- */
- public static function createFromPhpError($ch = null): self
- {
- return new self($ch ? \curl_error($ch) : '', $ch ? \curl_errno($ch) : 0);
- }
-}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php b/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
deleted file mode 100644
index d7d5a010d..000000000
--- a/vendor/thecodingmachine/safe/lib/Exceptions/JsonException.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-
-namespace Safe\Exceptions;
-
-class JsonException extends \JsonException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- return new self(\json_last_error_msg(), \json_last_error());
- }
-}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php b/vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php
deleted file mode 100644
index 5f424af2d..000000000
--- a/vendor/thecodingmachine/safe/lib/Exceptions/OpensslException.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-
-namespace Safe\Exceptions;
-
-class OpensslException extends \Exception implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- return new self(\openssl_error_string() ?: '', 0);
- }
-}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php b/vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php
deleted file mode 100644
index ee6367ef6..000000000
--- a/vendor/thecodingmachine/safe/lib/Exceptions/PcreException.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-
-namespace Safe\Exceptions;
-
-class PcreException extends \Exception implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $errorMap = [
- PREG_INTERNAL_ERROR => 'PREG_INTERNAL_ERROR: Internal error',
- PREG_BACKTRACK_LIMIT_ERROR => 'PREG_BACKTRACK_LIMIT_ERROR: Backtrack limit reached',
- PREG_RECURSION_LIMIT_ERROR => 'PREG_RECURSION_LIMIT_ERROR: Recursion limit reached',
- PREG_BAD_UTF8_ERROR => 'PREG_BAD_UTF8_ERROR: Invalid UTF8 character',
- PREG_BAD_UTF8_OFFSET_ERROR => 'PREG_BAD_UTF8_OFFSET_ERROR',
- PREG_JIT_STACKLIMIT_ERROR => 'PREG_JIT_STACKLIMIT_ERROR',
- ];
- $errMsg = $errorMap[preg_last_error()] ?? 'Unknown PCRE error: '.preg_last_error();
- return new self($errMsg, \preg_last_error());
- }
-}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php b/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php
deleted file mode 100644
index fbea6ad25..000000000
--- a/vendor/thecodingmachine/safe/lib/Exceptions/SafeExceptionInterface.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-
-namespace Safe\Exceptions;
-
-interface SafeExceptionInterface extends \Throwable
-{
-
-}
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php
deleted file mode 100644
index 477a9151c..000000000
--- a/vendor/thecodingmachine/safe/lib/Exceptions/SimplexmlException.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace Safe\Exceptions;
-
-class SimplexmlException extends \ErrorException implements SafeExceptionInterface
-{
- public static function createFromPhpError(): self
- {
- $error = \error_get_last();
- return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
- }
-}