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

Internal classes should use @psalm-readonly for properties? (pure-ish functions) #2

Open
dkreuer opened this issue Oct 14, 2019 · 1 comment

Comments

@dkreuer
Copy link
Contributor

dkreuer commented Oct 14, 2019

The internal class can be simplified by using psalm annotations to mark properties readonly and make them public. Write access would be detected by psalm and thrown as error.

When not having the requirement of php 7.2 (which still exists) https://github.com/Roave/you-are-using-it-wrong can be used afterwards to enforce the correct use of the library.

@dkreuer
Copy link
Contributor Author

dkreuer commented Oct 14, 2019

Not yet resolved. Key is that the properties are public and don’t have getters

@dkreuer dkreuer reopened this Oct 14, 2019
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

No branches or pull requests

1 participant