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 @@ -224,7 +224,7 @@ to terminate execution:
224224public function execute(Arguments $args, ConsoleIo $io): int
225225{
226226 $name = $args->getArgument('name');
227- if (mb_strlen($name) < 5 ) {
227+ if (mb_strlen($name) < 4 ) {
228228 // Halt execution, output to stderr, and set exit code to 1
229229 $io->error('Name must be at least 4 characters long.');
230230 $this->abort();
@@ -240,7 +240,7 @@ You can also use `abort()` on the `$io` object to emit a message and code:
240240public function execute(Arguments $args, ConsoleIo $io): int
241241{
242242 $name = $args->getArgument('name');
243- if (mb_strlen($name) < 5 ) {
243+ if (mb_strlen($name) < 4 ) {
244244 // Halt execution, output to stderr, and set exit code to 99
245245 $io->abort('Name must be at least 4 characters long.', 99);
246246 }
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