Opened 7 years ago
Closed 6 years ago
#43763 closed defect (bug) (invalid)
Auto-fixable CS violations in Core
Reported by: | tfrommen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | coding-standards | Cc: |
Description
There are Core files with unopinionated CS violations that should be fixed.
Attachments (1)
Change History (5)
#2
@
7 years ago
Hi Juliette,
yeah, absolutely. That could have been fixed differently. In this case, I decided to leave it like so (which was basically the result of running phpcbf on that file), because the array before is actually the one being used in the line that I updated (which one doesn't see in the diff). So the two variables are at least somewhat related.
That said, I could also just remove the whitespace, and add a blank line in there, if you like that better. :)
Note: See
TracTickets for help on using
tickets.
LGTM.
Just FYI: The first one (in
src/wp-includes/widgets/class-wp-widget-media.php
) can also be fixed by adding a new line before that line instead of making the assignment operators line up. For large arrays with assignment lines after them, that is sometimes a "cleaner" solution.Up to you what makes the most sense in this situation.