From e6510aade1472d4d8900e2d9d244447564ea1a7b Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Sun, 12 Jan 2020 10:21:04 +0000 Subject: [PATCH] allow plugin to continue operating if assertions are configured to be non-fatal --- hooks/TestCaseHandler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hooks/TestCaseHandler.php b/hooks/TestCaseHandler.php index b16c403..e2917e3 100644 --- a/hooks/TestCaseHandler.php +++ b/hooks/TestCaseHandler.php @@ -371,6 +371,9 @@ function ( $potential_argument_type = $potential_argument_types[$param_offset]; assert(null !== $param->type); + if (is_null($param->type)) { + $param->type = Type::getMixed(); + } if ($param->is_variadic) { $param_types = self::getAtomics($param->type); $variadic_param_type = new Type\Union(array_values($param_types));