From 7be968ae8afb8be82d57b4acc2eda19197b377c1 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 8 Dec 2023 03:25:55 +0800 Subject: [PATCH] [10.x] Fixes `AboutCommand::format()` docblock (#49274) * [10.x] Fixes `AboutCommand::format()` docblock Signed-off-by: Mior Muhammad Zaki * Apply fixes from StyleCI --------- Signed-off-by: Mior Muhammad Zaki Co-authored-by: StyleCI Bot --- src/Illuminate/Foundation/Console/AboutCommand.php | 4 ++-- types/Foundation/AboutCommand.php | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 types/Foundation/AboutCommand.php diff --git a/src/Illuminate/Foundation/Console/AboutCommand.php b/src/Illuminate/Foundation/Console/AboutCommand.php index 3b3c2cd958e8..23d2b23b631a 100644 --- a/src/Illuminate/Foundation/Console/AboutCommand.php +++ b/src/Illuminate/Foundation/Console/AboutCommand.php @@ -273,8 +273,8 @@ protected function sections() * Materialize a function that formats a given value for CLI or JSON output. * * @param mixed $value - * @param (\Closure():(mixed))|null $console - * @param (\Closure():(mixed))|null $json + * @param (\Closure(mixed):(mixed))|null $console + * @param (\Closure(mixed):(mixed))|null $json * @return \Closure(bool):mixed */ public static function format($value, Closure $console = null, Closure $json = null) diff --git a/types/Foundation/AboutCommand.php b/types/Foundation/AboutCommand.php new file mode 100644 index 000000000000..61718f36914a --- /dev/null +++ b/types/Foundation/AboutCommand.php @@ -0,0 +1,11 @@ + $value ? 'ENABLED' : 'OFF'); + +assertType('Closure(bool): mixed', $format); +assertType('mixed', $format(false)); +assertType('mixed', $format(true));