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

Extract helper methods in Describer class to create developer hooks #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

caendesilva
Copy link
Contributor

Extracting helper methods like this makes it easier for developers wanting to customize the output to hook into specific parts of the existing logic.

For example, I wanted to extend the Describer class to customize just the sorting of the commands, but am forced to reimplement the entire method, which increases the amount of code I need to maintain, and makes it harder to stay in sync with updates to this package.

Being able to just extend the single method makes the code much cleaner and more extendable.

Extracting helper methods like this makes it easier for developers wanting to customize the output to hook into specific parts of the existing logic.

For example, I wanted to extend the Describer class to customize just the sorting of the commands, but am forced to reimplement the entire method, which increases the amount of code I need to maintain, and makes it harder to stay in sync with updates to this package.

Being able to just extend the single method makes the code much cleaner and more extendable.
@caendesilva
Copy link
Contributor Author

@owenvoke Would you mind taking a look at this?

caendesilva added a commit to hydephp/cli that referenced this pull request Apr 17, 2024
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.

1 participant