From 753666c7287de656f563ce25f76e05227ece8026 Mon Sep 17 00:00:00 2001 From: Richard Quadling Date: Mon, 24 Dec 2018 14:21:28 +0000 Subject: [PATCH] generateMessage will always return a string. --- lib/Assert/Assertion.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Assert/Assertion.php b/lib/Assert/Assertion.php index 29bc3646..2e493a62 100644 --- a/lib/Assert/Assertion.php +++ b/lib/Assert/Assertion.php @@ -2589,9 +2589,9 @@ protected static function stringify($value) * * @param string|callable $message * - * @return string|null + * @return string */ - protected static function generateMessage($message) + protected static function generateMessage($message): string { if (\is_callable($message)) { $traces = \debug_backtrace(0); @@ -2618,6 +2618,6 @@ protected static function generateMessage($message) } // @codeCoverageIgnoreEnd } - return \is_null($message) ? null : (string) $message; + return (string) $message; } }