Skip to content
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

It should add splitting extra argument to newArgv #64

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

peter279k
Copy link
Collaborator

As title.

@peter279k peter279k requested a review from c9s April 13, 2023 13:59
@peter279k peter279k self-assigned this Apr 13, 2023
@@ -175,6 +174,11 @@ public function parse(array $argv)
}

$spec = $this->specs->get($arg->getOptionName());

if ((string) $arg === '--') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling get value method might be better than casting object to string here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just notice that $arg->getOptionName() will get the - when the $arg is --.

@c9s
Copy link
Owner

c9s commented Apr 13, 2023

added a comment

@peter279k peter279k force-pushed the add_split_extra_arg branch from f0c79b1 to b2af7cd Compare April 13, 2023 14:26
@peter279k peter279k requested a review from c9s April 13, 2023 14:26
@peter279k peter279k force-pushed the add_split_extra_arg branch from b2af7cd to 3d8bd1d Compare April 14, 2023 01:52
@c9s c9s merged commit aab2728 into c9s:master Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants