Skip to content

Commit 02af7b6

Browse files
committed
chore: update some param sign for write message
1 parent da93e7b commit 02af7b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/Traits/WriteMessageTrait.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace Toolkit\Cli\Traits;
1111

12+
use Stringable;
1213
use Toolkit\Cli\Style;
1314
use function count;
1415
use function fopen;
@@ -156,14 +157,14 @@ public static function print(array|string $message, bool $quit = false, array $o
156157
* ]
157158
* ```
158159
*
159-
* @param array|string $messages Output message
160+
* @param array|string|Stringable $messages Output message
160161
* @param bool $nl True - Will add line breaks, False Raw output.
161162
* @param bool $quit whether quit after write
162163
* @param array{color:bool,stream:resource,flush:bool,quit:bool,quitCode:int} $opts Some options for write
163164
*
164165
* @return int
165166
*/
166-
public static function write(array|string $messages, bool $nl = true, bool $quit = false, array $opts = []): int
167+
public static function write(array|string|Stringable $messages, bool $nl = true, bool $quit = false, array $opts = []): int
167168
{
168169
if (is_array($messages)) {
169170
$messages = implode($nl ? PHP_EOL : '', $messages);

0 commit comments

Comments
 (0)