Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/console-commands/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ to terminate execution:
public function execute(Arguments $args, ConsoleIo $io): int
{
$name = $args->getArgument('name');
if (mb_strlen($name) < 5) {
if (mb_strlen($name) < 4) {
// Halt execution, output to stderr, and set exit code to 1
$io->error('Name must be at least 4 characters long.');
$this->abort();
Expand All @@ -228,7 +228,7 @@ You can also use `abort()` on the `$io` object to emit a message and code:
public function execute(Arguments $args, ConsoleIo $io): int
{
$name = $args->getArgument('name');
if (mb_strlen($name) < 5) {
if (mb_strlen($name) < 4) {
// Halt execution, output to stderr, and set exit code to 99
$io->abort('Name must be at least 4 characters long.', 99);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/ja/console-commands/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class UserCommand extends Command
public function execute(Arguments $args, ConsoleIo $io)
{
$name = $args->getArgument('name');
if (strlen($name) < 5) {
if (strlen($name) < 4) {
// 実行を停止し、標準エラーに出力し、終了コードを 1 に設定
$io->error('Name must be at least 4 characters long.');
$this->abort();
Expand All @@ -210,7 +210,7 @@ public function execute(Arguments $args, ConsoleIo $io)
public function execute(Arguments $args, ConsoleIo $io)
{
$name = $args->getArgument('name');
if (strlen($name) < 5) {
if (strlen($name) < 4) {
// 実行を停止しstderrに出力し、終了コードを99に設定します
$io->abort('名前は4文字以上にする必要があります。', 99);
}
Expand Down