From 56b0a6bf6eef5cb3f774f1fcf3a02848b1303226 Mon Sep 17 00:00:00 2001 From: David Molnar Date: Fri, 3 Jun 2022 16:27:24 +0200 Subject: [PATCH] Add missing methods to the Throwable polyfill To prevent issues with static analysis. --- src/throwable.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/throwable.php b/src/throwable.php index fe19a23..08bf1d6 100644 --- a/src/throwable.php +++ b/src/throwable.php @@ -2,5 +2,23 @@ // @codingStandardsIgnoreFile // phpcs:ignore if (!interface_exists('Throwable')) { - interface Throwable {} + interface Throwable + { + /** @return string */ + public function getMessage(); + /** @return int */ + public function getCode(); + /** @return string */ + public function getFile(); + /** @return int */ + public function getLine(); + /** @return array */ + public function getTrace(); + /** @return string */ + public function getTraceAsString(); + /** @return null|Throwable */ + public function getPrevious(); + /** @return string */ + public function __toString(); + } }