Skip to content

Commit

Permalink
docs: clarify use of hasOption() (#54415)
Browse files Browse the repository at this point in the history
* docs: clarify use of hasOption()

`hasOption()` does not check whether the command has been _called_ with the given option, but rather whether the command even _accepts_ the option.

* Update src/Illuminate/Console/Concerns/InteractsWithIO.php

Co-authored-by: Sebastian Hädrich <[email protected]>

---------

Co-authored-by: Sebastian Hädrich <[email protected]>
  • Loading branch information
jezmck and shaedrich authored Jan 30, 2025
1 parent a267443 commit 6cdef2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Console/Concerns/InteractsWithIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function arguments()
}

/**
* Determine if the given option is present.
* Determine whether the option is defined in the command signature.
*
* @param string $name
* @return bool
Expand Down

0 comments on commit 6cdef2c

Please sign in to comment.