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

Add support for protected(set) and public(set) #25

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

Conversation

ryangjchandler
Copy link

@ryangjchandler ryangjchandler commented Dec 11, 2024

protected(set) and public(set) are semantically valid. public public(set) is silly but valid PHP code. PHP doesn't warn or error because of the identical visibilities.

I've added a new linter rule to tell you that the additional write visibility is redundant too:

image

Side note - I've marked the fix as potentially unsafe since there could be a reason for having identical read/write visibilities, but also happy to change that to a safe fix since it doesn't really have an effect.

@azjezz
Copy link
Member

azjezz commented Dec 11, 2024

Huh! i was not even aware that those modifiers were supported!

Thank you for your contribution! :D

@azjezz azjezz added enhancement New feature or request bug Something isn't working labels Dec 11, 2024
@ryangjchandler
Copy link
Author

Commit is saying unverified, but I've definitely got a GPG key setup 🫠

@azjezz azjezz force-pushed the main branch 8 times, most recently from 763610e to b9aa4b7 Compare December 21, 2024 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants