fix:更新已知bug,优化代码

This commit is contained in:
Ying
2022-11-28 19:11:12 +08:00
parent f6aee95cfc
commit 9445b206a2
1378 changed files with 53759 additions and 20789 deletions

View File

@@ -35,45 +35,33 @@ interface StyleInterface
/**
* Formats informational text.
*
* @param string|array $message
*/
public function text($message);
public function text(string|array $message);
/**
* Formats a success result bar.
*
* @param string|array $message
*/
public function success($message);
public function success(string|array $message);
/**
* Formats an error result bar.
*
* @param string|array $message
*/
public function error($message);
public function error(string|array $message);
/**
* Formats an warning result bar.
*
* @param string|array $message
*/
public function warning($message);
public function warning(string|array $message);
/**
* Formats a note admonition.
*
* @param string|array $message
*/
public function note($message);
public function note(string|array $message);
/**
* Formats a caution admonition.
*
* @param string|array $message
*/
public function caution($message);
public function caution(string|array $message);
/**
* Formats a table.
@@ -82,33 +70,23 @@ interface StyleInterface
/**
* Asks a question.
*
* @return mixed
*/
public function ask(string $question, string $default = null, callable $validator = null);
public function ask(string $question, string $default = null, callable $validator = null): mixed;
/**
* Asks a question with the user input hidden.
*
* @return mixed
*/
public function askHidden(string $question, callable $validator = null);
public function askHidden(string $question, callable $validator = null): mixed;
/**
* Asks for confirmation.
*
* @return bool
*/
public function confirm(string $question, bool $default = true);
public function confirm(string $question, bool $default = true): bool;
/**
* Asks a choice question.
*
* @param string|int|null $default
*
* @return mixed
*/
public function choice(string $question, array $choices, $default = null);
public function choice(string $question, array $choices, mixed $default = null): mixed;
/**
* Add newline(s).