Skip to content

Commit 4c773e1

Browse files
committed
Fixed code examples in components/console.rst
1 parent 6ec0e9c commit 4c773e1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

components/console.rst

+4-6
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ and make the ``name`` argument required::
141141
$this
142142
// ...
143143
->addArgument('name', InputArgument::REQUIRED, 'Who do you want to greet?')
144-
->addArgument('last_name', InputArgument::OPTIONAL, 'Your last name?')
145-
// ...
144+
->addArgument('last_name', InputArgument::OPTIONAL, 'Your last name?');
146145

147146
You now have access to a ``last_name`` argument in your command::
148147

@@ -178,7 +177,7 @@ how many times in a row the message should be printed::
178177

179178
$this
180179
// ...
181-
->addOption('iterations', null, InputOption::VALUE_REQUIRED, 'How many times should the message be printed?', 1)
180+
->addOption('iterations', null, InputOption::VALUE_REQUIRED, 'How many times should the message be printed?', 1);
182181

183182
Next, use this in the command to print the message multiple times:
184183

@@ -226,7 +225,7 @@ You can combine VALUE_IS_ARRAY with VALUE_REQUIRED or VALUE_OPTIONAL like this:
226225
227226
$this
228227
// ...
229-
->addOption('iterations', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'How many times should the message be printed?', 1)
228+
->addOption('iterations', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'How many times should the message be printed?', 1);
230229
231230
Asking the User for Information
232231
-------------------------------
@@ -294,8 +293,7 @@ method::
294293

295294
class ListCommandTest extends \PHPUnit_Framework_TestCase
296295
{
297-
298-
//--
296+
// ...
299297

300298
public function testNameIsOutput()
301299
{

0 commit comments

Comments
 (0)