Repository navigation
Add flags to Parser::parse() for options that take no value - #61
Merged
Merged
Conversation
Assisted-by: Claude Code
This comment has been minimized.
This comment has been minimized.
Code Metrics Report
Details | | master (4b6c04c) | T60-parse-flags (a5bff1e) | +/- |
|---------------------|------------------|---------------------------|------|
| Coverage | 100.0% | 100.0% | 0.0% |
| Files | 1 | 1 | 0 |
| Lines | 71 | 73 | +2 |
+ | Covered | 71 | 73 | +2 |
+ | Test Execution Time | 1s | 0s | -1s |Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)
Reported by octocov |
4 tasks done
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
In raising this pull request, I confirm the following:
Small description of change:
Stacked on #59. Merge #59 first. GitHub then moves the base of this PR to
3.0.x.parse(array $argv = [], array $flags = []).$flagslists the names of the options that take no value, without dashes. The flags apply only to that call.--name value: a flag does not takevalue.valuebecomes a positional argument.-abc value: each flag letter istrue, and the other letters takevalue. If all letters are flags,valuebecomes a positional argument.--name=valuekeeps the value, also for a flag.$flags, the result is the same as in 2.x. All the current test cases pass with no change.Results in the PHP 8.3 container: 54 tests pass, line coverage 100% (73/73), Infection MSI 100% and covered MSI 100% (120 mutants). PHPCS, PHPStan and PHP CS Fixer pass.
Thanks