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

feat: Add support for default values on metadata properties #23

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

owenconti
Copy link
Contributor

This PR adds support for attributes to define default values. This allows us to remove a lot of boilerplate code for attribute values that are optional.

For example, we have an enum for an instrument type and each type can optionally be marked as deprecated. Currently, we have to have a IsDeprecated attribute on every single enum case, when only 2 out of 15 types are currently deprecated.

This PR would allow us to only add code for the few types that are actually deprecated, by defaulting the method to return false.

tests/Pest.php Outdated Show resolved Hide resolved
@stancl stancl merged commit 5be8a58 into archtechx:master Jul 15, 2024
5 checks passed
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