Skip to content

Commit df44c8f

Browse files
authored
Update questionhelper.rst
Fix typo for "Command::SUCCESS"
1 parent 29d3c27 commit df44c8f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if you want to know a bundle name, you can add this to your command::
8888
8989
// ... do something with the bundleName
9090
91-
return Commande::SUCCESS;
91+
return Command::SUCCESS;
9292
}
9393

9494
The user will be asked "Please enter the name of the bundle". They can type
@@ -124,7 +124,7 @@ from a predefined list::
124124

125125
// ... do something with the color
126126
127-
return Commande::SUCCESS;
127+
return Command::SUCCESS;
128128
}
129129

130130
.. versionadded:: 5.2
@@ -166,7 +166,7 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
166166
$colors = $helper->ask($input, $output, $question);
167167
$output->writeln('You have just selected: ' . implode(', ', $colors));
168168
169-
return Commande::SUCCESS;
169+
return Command::SUCCESS;
170170
}
171171

172172
Now, when the user enters ``1,2``, the result will be:
@@ -197,7 +197,7 @@ will be autocompleted as the user types::
197197
198198
// ... do something with the bundleName
199199
200-
return Commande::SUCCESS;
200+
return Command::SUCCESS;
201201
}
202202

203203
In more complex use cases, it may be necessary to generate suggestions on the
@@ -236,7 +236,7 @@ provide a callback function to dynamically generate suggestions::
236236
237237
// ... do something with the filePath
238238
239-
return Commande::SUCCESS;
239+
return Command::SUCCESS;
240240
}
241241

242242
Do not Trim the Answer
@@ -260,7 +260,7 @@ You can also specify if you want to not trim the answer by setting it directly w
260260
261261
// ... do something with the name
262262
263-
return Commande::SUCCESS;
263+
return Command::SUCCESS;
264264
}
265265

266266
Accept Multiline Answers
@@ -291,7 +291,7 @@ the response to a question should allow multiline answers by passing ``true`` to
291291
292292
// ... do something with the answer
293293
294-
return Commande::SUCCESS;
294+
return Command::SUCCESS;
295295
}
296296

297297
Multiline questions stop reading user input after receiving an end-of-transmission
@@ -319,7 +319,7 @@ convenient for passwords::
319319
320320
// ... do something with the password
321321
322-
return Commande::SUCCESS;
322+
return Command::SUCCESS;
323323
}
324324

325325
.. caution::
@@ -351,7 +351,7 @@ convenient for passwords::
351351

352352
// ...
353353
354-
return Commande::SUCCESS;
354+
return Command::SUCCESS;
355355
}
356356

357357
Normalizing the Answer
@@ -382,7 +382,7 @@ method::
382382
383383
// ... do something with the bundleName
384384
385-
return Commande::SUCCESS;
385+
return Command::SUCCESS;
386386
}
387387

388388
.. caution::
@@ -426,7 +426,7 @@ method::
426426
427427
// ... do something with the bundleName
428428
429-
return Commande::SUCCESS;
429+
return Command::SUCCESS;
430430
}
431431

432432
The ``$validator`` is a callback which handles the validation. It should
@@ -488,7 +488,7 @@ You can also use a validator with a hidden question::
488488
489489
// ... do something with the password
490490
491-
return Commande::SUCCESS;
491+
return Command::SUCCESS;
492492
}
493493

494494
Testing a Command that Expects Input

0 commit comments

Comments
 (0)