File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/Illuminate/Foundation/Console Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -273,8 +273,8 @@ protected function sections()
273
273
* Materialize a function that formats a given value for CLI or JSON output.
274
274
*
275
275
* @param mixed $value
276
- * @param (\Closure():(mixed))|null $console
277
- * @param (\Closure():(mixed))|null $json
276
+ * @param (\Closure(mixed ):(mixed))|null $console
277
+ * @param (\Closure(mixed ):(mixed))|null $json
278
278
* @return \Closure(bool):mixed
279
279
*/
280
280
public static function format ($ value , Closure $ console = null , Closure $ json = null )
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Foundation \Console \AboutCommand ;
4
+
5
+ use function PHPStan \Testing \assertType ;
6
+
7
+ $ format = AboutCommand::format (true , console: fn ($ value ) => $ value ? '<fg=yellow;options=bold>ENABLED</> ' : 'OFF ' );
8
+
9
+ assertType ('Closure(bool): mixed ' , $ format );
10
+ assertType ('mixed ' , $ format (false ));
11
+ assertType ('mixed ' , $ format (true ));
You can’t perform that action at this time.
0 commit comments