Repository navigation
PSR2/ClassDeclarationSniff: use placeholders in error messages - #1446
Conversation
Replace string concatenation with placeholders to follow the best practice. - `ExtendsLine` and `ImplementsLine` error messages now expose 3 data values (previously 1). - `SpaceBeforeExtends` and `SpaceBeforeImplements` error messages now expose 2 data values (previously 1).
8a66b4a to
a76b109
Compare
|
For the record: these changes also affect overruled error messages for the |
No worries at all — please take your time. I've also been involved in other open-source projects for a few years, so I completely understand. :D
Will update them later. I wasn't aware of the override behavior when I submitted these PRs. I did notice it while looking into issue #1282, but that issue grew into a somewhat large one for me, and I didn't realize this also affected these PRs. 😂 |
Sorry, my comment apparently was unclear. There is no need to update any code for this. What I meant to say is that the above mentioned sniffs inherit these error messages from this PSR2 sniff. In effect that means that if someone would be overruling the messages for the affected error codes in the PSR12 or Squiz sniff via a custom ruleset, they should also review the overruled message text to add the (additional) placeholders. In other words: this is something which only needs to be handled via a mention in the changelog.
Thank you for your understanding and patience! |
That's what I understood as well. It was just my poor English wording. I originally wrote "Will update the changelog in the PR description", but since there are also other PRs whose changelogs need updating, I changed it to "them", which apparently made it ambiguous. 😅 BTW, I'm carefully checking some of the refactoring logic in Neovim, so it may take me another two or three days to work through your other comments. 😁 |
Ah! No worries about that. I use the changelog entries in the PRs as a starting point and then craft the changelog manually anyway, so I'll handle that.
All good. Take your time. Shall I merge those two PRs now and then you can submit separate PR(s) to remove the duplicate code after ? |
Sounds good, I'll make a note of it. :D |
Description
Replace string concatenation with placeholders to follow the best practice.
Suggested changelog entry
Changed:
ExtendsLineandImplementsLineerror messages now expose 3 data values (previously 1).SpaceBeforeExtendsandSpaceBeforeImplementserror messages now expose 2 data values (previously 1).Related issues/external references
Related to #1240
Types of changes
PR checklist
Changes are already covered by
PSR2/Tests/Classes/ClassDeclarationUnitTest.inc