From 0d5f4379709d165045adce7acfd10f611fa396f7 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sun, 18 Aug 2024 00:15:13 +0200 Subject: [PATCH] Fix return value of PhutilTestCase::tryTestCaseMap() Summary: `PhutilTestCase::tryTestCases()` returns void. Thus `PhutilTestCase::tryTestCaseMap()` should behave the same way as `PhutilTestCase::assertException()`: return void. Test Plan: Read the code; run static code analysis and don't get "Result of method PhutilTestCase::tryTestCases() (void) is used" anymore. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25791 --- src/unit/engine/phutil/PhutilTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unit/engine/phutil/PhutilTestCase.php b/src/unit/engine/phutil/PhutilTestCase.php index e5f56164..81062ff2 100644 --- a/src/unit/engine/phutil/PhutilTestCase.php +++ b/src/unit/engine/phutil/PhutilTestCase.php @@ -445,7 +445,7 @@ abstract class PhutilTestCase extends Phobject { $callable, $exception_class = 'Exception') { - return $this->tryTestCases( + $this->tryTestCases( array_fuse(array_keys($map)), array_values($map), $callable,