projects
/
m6w6
/
seekat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
update to PHP-8.1
[m6w6/seekat]
/
lib
/
Exception
/
functions.php
diff --git
a/lib/Exception/functions.php
b/lib/Exception/functions.php
index 0c7171a0176886845395e0c8056256317e8af36d..1930ad091713419d28ed3766328c83a1cdf9caf7 100644
(file)
--- a/
lib/Exception/functions.php
+++ b/
lib/Exception/functions.php
@@
-2,12
+2,14
@@
namespace seekat\Exception;
namespace seekat\Exception;
+use Throwable;
+
/**
/**
- * @param string|
\
Throwable $message
- * @return
\
Throwable
+ * @param string|Throwable $message
+ * @return Throwable
*/
*/
-function exception(&$message) :
\
Throwable {
- if ($message instanceof
\
Throwable){
+function exception(&$message) : Throwable {
+ if ($message instanceof Throwable){
$exception = $message;
$message = $exception->getMessage();
} else {
$exception = $message;
$message = $exception->getMessage();
} else {
@@
-18,11
+20,10
@@
function exception(&$message) : \Throwable {
/**
* Canonical error message from a string or Exception
/**
* Canonical error message from a string or Exception
- * @param string|\Throwable $error
- * @return string
+ * @param string|Throwable $error
*/
function message(&$error) : ?string {
*/
function message(&$error) : ?string {
- if ($error instanceof
\
Throwable) {
+ if ($error instanceof Throwable) {
$message = $error->getMessage();
} else {
$message = $error;
$message = $error->getMessage();
} else {
$message = $error;