From 5be1edd7b797f9cd43eb7a4dabfcc3ec803184c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20N=C3=BCrnberger?= Date: Fri, 19 Jun 2020 20:51:27 +0200 Subject: [PATCH] added missing return types --- src/Concerns/TestCase.php | 9 +++++++++ src/Factories/TestCaseFactory.php | 3 +++ src/Support/ExceptionTrace.php | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/Concerns/TestCase.php b/src/Concerns/TestCase.php index 369bb5d5..fecd488e 100644 --- a/src/Concerns/TestCase.php +++ b/src/Concerns/TestCase.php @@ -129,12 +129,21 @@ trait TestCase /** * Runs the test. + * + * @return mixed + * + * @throws \Throwable */ public function __test() { return $this->__callClosure($this->__test, func_get_args()); } + /** + * @return mixed + * + * @throws \Throwable + */ private function __callClosure(Closure $closure, array $arguments) { return ExceptionTrace::ensure(function () use ($closure, $arguments) { diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index 88124936..f3e8e282 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -132,6 +132,9 @@ final class TestCaseFactory $proxies = $this->proxies; $factoryTest = $this->test; + /** + * @return mixed + */ $test = function () use ($chains, $proxies, $factoryTest) { $proxies->proxy($this); $chains->chain($this); diff --git a/src/Support/ExceptionTrace.php b/src/Support/ExceptionTrace.php index e7c31d58..72a1d829 100644 --- a/src/Support/ExceptionTrace.php +++ b/src/Support/ExceptionTrace.php @@ -17,6 +17,10 @@ final class ExceptionTrace /** * Ensures the given closure reports * the good execution context. + * + * @return mixed + * + * @throws \Throwable */ public static function ensure(Closure $closure) {