Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#43763 closed defect (bug) (invalid)

Auto-fixable CS violations in Core

Reported by: tfrommen Owned by:
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords: has-patch
Cc: Focuses: coding-standards

Description

There are Core files with unopinionated CS violations that should be fixed.

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

@tfrommen
8 years ago

#1 @jrf
8 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
8 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
8 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
7 years ago

  • Milestone Awaiting Review
  • Resolutioninvalid
  • Status newclosed

This ended up getting fixed in [43571].

Note: See TracTickets for help on using tickets.