-
-
Notifications
You must be signed in to change notification settings - Fork 39
Parser add unRegister method #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add the unRegister method to unRegister
Codecov Report
@@ Coverage Diff @@
## main #61 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 336 337 +1
===========================================
Files 16 16
Lines 827 830 +3
===========================================
+ Hits 827 830 +3
Continue to review full report at Codecov.
|
src/Input/Parser.php
Outdated
| */ | ||
| public function unRegister($name) | ||
| { | ||
| if (isset($this->_values[$name])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for unset no need to check first with isset.
also multiple unset can be combined
eg: unset($a['key1'], $a['key2']);
|
thank you very much. please try to get build pass somehow. 👏 |
|
In the https://travis-ci.com/github/adhocore/php-cli/jobs/467713360 mission tasks fail because the configuration error |
|
thanks, instead of using unregister() method, can we rename it to unset()? we have register() method with Parameter class as input arg which is not in line with unregister() method with string arg. |
Add the unRegister method to unRegister
I had a situation in development where I needed to unregister but _options was private so I couldn't unregister, so I added this.