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

Do not mention default values in PHPDoc #151

Open
arogachev opened this issue Feb 24, 2022 · 1 comment
Open

Do not mention default values in PHPDoc #151

arogachev opened this issue Feb 24, 2022 · 1 comment
Assignees
Labels
status:ready for adoption Feel free to implement this issue. type:docs Documentation

Comments

@arogachev
Copy link
Contributor

This seems redundant:

https://github.com/yiisoft/validator/blob/30cbd83eff595c26bca45f1b1ddcec5d2935a791/src/Rule/Boolean.php#L20

  • Default value is shown in the docs, IDE also supports them.
  • It adds another source of truth, so docs can be out of sync after the code changes.

It can get even worse in case of bigger data:

https://github.com/yiisoft/validator/blob/30cbd83eff595c26bca45f1b1ddcec5d2935a791/src/Rule/Ip.php#L53-L61

@samdark
Copy link
Member

samdark commented Feb 24, 2022

Agree. Let's remove these.

@samdark samdark added status:ready for adoption Feel free to implement this issue. type:docs Documentation labels Feb 24, 2022
@arogachev arogachev self-assigned this Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue. type:docs Documentation
Projects
None yet
Development

No branches or pull requests

2 participants