Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#43763 closed defect (bug) (invalid)

Auto-fixable CS violations in Core

Reported by: tfrommen's profile 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)

43763.patch (1.4 KB) - added by tfrommen 7 years ago.

Download all attachments as: .zip

Change History (5)

@tfrommen
7 years ago

#1 @jrf
7 years ago

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.

#2 @tfrommen
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. :)

#3 @jrf
7 years ago

the array before is actually the one being used in the line that I updated

@tfrommen I'd noticed ;-)
I'm happy with either method of fixing it in this case. Unfortunately I can't add the "commit" keyword, but this is good to go.

#4 @johnbillion
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This ended up getting fixed in [43571].

Note: See TracTickets for help on using tickets.