summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php')
-rw-r--r--vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php b/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
new file mode 100644
index 000000000..9c183b8e4
--- /dev/null
+++ b/vendor/thecodingmachine/safe/deprecated/Exceptions/PasswordException.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace Safe\Exceptions;
+
+/**
+ * @deprecated This exception is deprecated
+ */
+class PasswordException 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);
+ }
+}