PHP8
[m6w6/seekat] / lib / Exception / functions.php
index 9045cb3df3473f1f41df7a9422fb5f4a8c37b432..0c7171a0176886845395e0c8056256317e8af36d 100644 (file)
@@ -3,7 +3,7 @@
 namespace seekat\Exception;
 
 /**
- * @param $message
+ * @param string|\Throwable $message
  * @return \Throwable
  */
 function exception(&$message) : \Throwable {
@@ -18,10 +18,10 @@ function exception(&$message) : \Throwable {
 
 /**
  * Canonical error message from a string or Exception
- * @param string|Exception $error
+ * @param string|\Throwable $error
  * @return string
  */
-function message(&$error) : string {
+function message(&$error) : ?string {
        if ($error instanceof \Throwable) {
                $message = $error->getMessage();
        } else {