File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,7 @@ Options with optional arguments
222
222
-------------------------------
223
223
224
224
There is nothing forbidding you to create a command with an option that
225
- optionally accepts a value, but it's a bit tricky. Let's use this
226
- option definition as an example::
225
+ optionally accepts a value, but it's a bit tricky. Consider this example::
227
226
228
227
// ...
229
228
use Symfony\Component\Console\Input\InputOption;
@@ -256,8 +255,7 @@ To solve this issue, you have to set the option's default value to ``false``::
256
255
false // this is the new default value, instead of null
257
256
);
258
257
259
- And then you just have to check carefully the value of the option, minding that
260
- ``false !== null ``::
258
+ Now check the value of the option and keep in mind that ``false !== null ``::
261
259
262
260
$optionValue = $input->getOptions('yell');
263
261
$yell = ($optionValue !== false);
You can’t perform that action at this time.
0 commit comments