diff --git a/docs/en/console-commands/commands.md b/docs/en/console-commands/commands.md index 55cb26ebd8..5e96e5d2cf 100644 --- a/docs/en/console-commands/commands.md +++ b/docs/en/console-commands/commands.md @@ -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(); @@ -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); } diff --git a/docs/ja/console-commands/commands.md b/docs/ja/console-commands/commands.md index 48f48735ba..1660925989 100644 --- a/docs/ja/console-commands/commands.md +++ b/docs/ja/console-commands/commands.md @@ -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(); @@ -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); }