prettier / prettier/plugin-php
[PSR-12] Line breaks before `extends`/`implements`
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
-
The
extendsandimplementskeywords MUST be declared on the same line as the class name.
– Section 4.1
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 linked playground example and compare its current output with PSR-12 section 4.1. The issue names no source file or test, so locate the formatter entry point responsible for class declarations before assessing the change. Done means the output follows the stated extends/implements line-break rule, or the project records why it is intentionally retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100