Skip to content

Commit a5c886a

Browse files
committed
format Show::class codes
1 parent 1251a75 commit a5c886a

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

src/Console.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ public static function writeln($message, $quit = false, array $opts = []): int
143143

144144
/**
145145
* Write a message to standard output stream.
146+
*
146147
* @param string|array $messages Output message
147-
* @param boolean $nl True 会添加换行符, False 原样输出,不添加换行符
148-
* @param int|boolean $quit If is int, setting it is exit code. 'True' translate as code 0 and exit, 'False' will not exit.
149-
* @param array $opts
148+
* @param boolean $nl True 会添加换行符, False 原样输出,不添加换行符
149+
* @param int|boolean $quit If is int, setting it is exit code.
150+
* 'True' translate as code 0 and exit, 'False' will not exit.
151+
* @param array $opts Some options for write
150152
* [
151153
* 'color' => bool, // whether render color, default is: True.
152154
* 'stream' => resource, // the stream resource, default is: STDOUT

src/Util/Show.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Show
6868

6969
/**
7070
* @param mixed $messages
71-
* @param string $type
71+
* @param string $type
7272
* @param string $style
7373
* @param int|boolean $quit If is int, setting it is exit code.
7474
* @return int
@@ -94,13 +94,17 @@ public static function block($messages, string $type = 'MESSAGE', string $style
9494

9595
/**
9696
* @param mixed $messages
97-
* @param string $type
97+
* @param string $type
9898
* @param string $style
9999
* @param int|boolean $quit If is int, setting it is exit code.
100100
* @return int
101101
*/
102-
public static function liteBlock($messages, string $type = 'MESSAGE', string $style = Style::NORMAL, $quit = false): int
103-
{
102+
public static function liteBlock(
103+
$messages,
104+
string $type = 'MESSAGE',
105+
string $style = Style::NORMAL,
106+
$quit = false
107+
): int {
104108
$messages = \is_array($messages) ? \array_values($messages) : [$messages];
105109

106110
// add type
@@ -220,7 +224,7 @@ public static function title(string $title, array $opts = []): void
220224

221225
/**
222226
* @param string $title The title text
223-
* @param string|array $body The section body message
227+
* @param string|array $body The section body message
224228
* @param array $opts
225229
*/
226230
public static function section(string $title, $body, array $opts = []): void
@@ -617,9 +621,9 @@ public static function clearBuffer(): void
617621

618622
/**
619623
* stop buffering
620-
* @see Show::write()
624+
* @see Show::write()
621625
* @param bool $flush Whether flush buffer to output stream
622-
* @param bool $nl Default is False, because the last write() have been added "\n"
626+
* @param bool $nl Default is False, because the last write() have been added "\n"
623627
* @param bool $quit
624628
* @param array $opts
625629
* @return null|string If flush = False, will return all buffer text.
@@ -645,7 +649,7 @@ public static function stopBuffer($flush = true, $nl = false, $quit = false, arr
645649

646650
/**
647651
* stop buffering and flush buffer text
648-
* @see Show::write()
652+
* @see Show::write()
649653
* @param bool $nl
650654
* @param bool $quit
651655
* @param array $opts
@@ -674,9 +678,10 @@ public static function writef(string $format, ...$args): int
674678
/**
675679
* Write a message to standard output stream.
676680
* @param string|array $messages Output message
677-
* @param boolean $nl True 会添加换行符, False 原样输出,不添加换行符
678-
* @param int|boolean $quit If is int, setting it is exit code. 'True' translate as code 0 and exit, 'False' will not exit.
679-
* @param array $opts
681+
* @param boolean $nl True 会添加换行符, False 原样输出,不添加换行符
682+
* @param int|boolean $quit If is int, setting it is exit code. 'True' translate as code 0 and exit, 'False' will not exit.
683+
* @param array $opts Some options for write
684+
* refer:
680685
* [
681686
* 'color' => bool, // whether render color, default is: True.
682687
* 'stream' => resource, // the stream resource, default is: STDOUT

0 commit comments

Comments
 (0)