From 5b394a7c91731dc9b65bc1dcebea0e50f50fdbe1 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Mon, 19 Jun 2017 12:08:00 +0900 Subject: [PATCH] Remove "Exception" type declaration --- src/Framework/TestFailure.php | 4 ++-- src/Framework/TestResult.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Framework/TestFailure.php b/src/Framework/TestFailure.php index c527a134296..d229e86d5fd 100644 --- a/src/Framework/TestFailure.php +++ b/src/Framework/TestFailure.php @@ -78,13 +78,13 @@ public function getExceptionAsString() /** * Returns a description for an exception. * - * @param Exception $e + * @param \Exception|\Throwable $e * * @return string * * @since Method available since Release 3.2.0 */ - public static function exceptionToString(Exception $e) + public static function exceptionToString($e) { if ($e instanceof PHPUnit_Framework_SelfDescribing) { $buffer = $e->toString(); diff --git a/src/Framework/TestResult.php b/src/Framework/TestResult.php index 8da7c35bce7..ef930b76a9c 100644 --- a/src/Framework/TestResult.php +++ b/src/Framework/TestResult.php @@ -189,10 +189,10 @@ public function flushListeners() * Adds an error to the list of errors. * * @param PHPUnit_Framework_Test $test - * @param Exception $e + * @param \Exception|\Throwable $e * @param float $time */ - public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) + public function addError(PHPUnit_Framework_Test $test, $e, $time) { if ($e instanceof PHPUnit_Framework_RiskyTest) { $this->risky[] = new PHPUnit_Framework_TestFailure($test, $e);