File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ to terminate execution:
212212public function execute(Arguments $args, ConsoleIo $io): int
213213{
214214 $name = $args->getArgument('name');
215- if (mb_strlen($name) < 5 ) {
215+ if (mb_strlen($name) < 4 ) {
216216 // Halt execution, output to stderr, and set exit code to 1
217217 $io->error('Name must be at least 4 characters long.');
218218 $this->abort();
@@ -228,7 +228,7 @@ You can also use `abort()` on the `$io` object to emit a message and code:
228228public function execute(Arguments $args, ConsoleIo $io): int
229229{
230230 $name = $args->getArgument('name');
231- if (mb_strlen($name) < 5 ) {
231+ if (mb_strlen($name) < 4 ) {
232232 // Halt execution, output to stderr, and set exit code to 99
233233 $io->abort('Name must be at least 4 characters long.', 99);
234234 }
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ class UserCommand extends Command
196196public function execute(Arguments $args, ConsoleIo $io)
197197{
198198 $name = $args->getArgument('name');
199- if (strlen($name) < 5 ) {
199+ if (strlen($name) < 4 ) {
200200 // 実行を停止し、標準エラーに出力し、終了コードを 1 に設定
201201 $io->error('Name must be at least 4 characters long.');
202202 $this->abort();
@@ -210,7 +210,7 @@ public function execute(Arguments $args, ConsoleIo $io)
210210public function execute(Arguments $args, ConsoleIo $io)
211211{
212212 $name = $args->getArgument('name');
213- if (strlen($name) < 5 ) {
213+ if (strlen($name) < 4 ) {
214214 // 実行を停止しstderrに出力し、終了コードを99に設定します
215215 $io->abort('名前は4文字以上にする必要があります。', 99);
216216 }
You can’t perform that action at this time.
0 commit comments