Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 549bc59

Browse files
committed
minor #20159 [Console] Improved the explanation of the hasOption() method (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20159). Discussion ---------- [Console] Improved the explanation of the hasOption() method | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17597 | License | MIT | Doc PR | - Commits ------- 29226ef [Console] Improved the explanation of the hasOption() method
2 parents f4fe36a + 29226ef commit 549bc59

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Console/Input/InputDefinition.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ public function getOption($name)
282282
/**
283283
* Returns true if an InputOption object exists by name.
284284
*
285+
* This method can't be used to check if the user included the option when
286+
* executing the command (use getOption() instead).
287+
*
285288
* @param string $name The InputOption name
286289
*
287290
* @return bool true if the InputOption object exists, false otherwise

0 commit comments

Comments
 (0)