From e6d2c24d3124ef7f5ec02eb7254da688ad53a392 Mon Sep 17 00:00:00 2001 From: Fritz <4413963+fritz-c@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:39:49 -0600 Subject: [PATCH] Fix `unless` code comment The existing code comment was copied from `when`, and therefore mistakenly explains the callback is called when the value is truthy. --- src/Illuminate/Collections/Enumerable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Collections/Enumerable.php b/src/Illuminate/Collections/Enumerable.php index 2a70e91af7c..90dbcd5bf5b 100644 --- a/src/Illuminate/Collections/Enumerable.php +++ b/src/Illuminate/Collections/Enumerable.php @@ -334,7 +334,7 @@ public function whenEmpty(callable $callback, ?callable $default = null); public function whenNotEmpty(callable $callback, ?callable $default = null); /** - * Apply the callback if the given "value" is (or resolves to) truthy. + * Apply the callback if the given "value" is (or resolves to) falsy. * * @template TUnlessReturnType *