prettier / prettier/plugin-php
[PSR-12] Method visibility
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
Disclaimer: I am aware that it's not make-or-break for Prettier to adhere to PSR-12.
However, now that it is officially accepted as a standard, we should discuss (and, if necessary, reject) each current violation of PSR-12 — if only to have point to refer to in future discussions or issues.
PSR-12 Violations
-
Visibility MUST be declared on all methods.
– Section 4.4Solving this reliably would need an
--engineflag if we attempt to support PHP 4 (and, therefore, thevarkeyword).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PSR-12 Section 4.4 requirement and the linked playground, then review the referenced --engine discussion in issue #939. Determine whether method visibility can be handled while supporting PHP 4 and the var keyword; done means the project has either implemented or explicitly rejected this listed violation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100