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

Refactor CLI option retrieval to improve typing #357

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

schlessera
Copy link
Collaborator

This PR splits the Options::getOption($option = [], $default = false) method up into two separate methods:

  • Options::getOption($option, $default = false) to retrieve the value of a single option.
  • Options::getOptions() to retrieve an associative array of all options.

This solves a static analysis problem where the return value can be an array or a scalar.

@schlessera schlessera added Tech Debt Deprecations, inefficiencies, code health CLI labels Sep 20, 2021
@schlessera schlessera added this to the 0.8.0 milestone Sep 20, 2021
@schlessera schlessera merged commit 15616e3 into main Sep 20, 2021
@schlessera schlessera deleted the fix/refactor-cli-option-retrieval branch September 20, 2021 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Tech Debt Deprecations, inefficiencies, code health
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant