WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#35565 closed enhancement (fixed)

Functions ending brace should be on a newline.

Reported by: georgestephanis Owned by: SergeyBiryukov
Milestone: 4.5 Priority: low
Severity: minor Version: 4.0
Component: Media Keywords: has-patch
Focuses: Cc:

Description

The _wp_handle_upload() function for a while now has had its ending brace on the same line as its return statement. This makes the code really hard to skim and is kinda ugly.

I'd like to see us rectify that and move it to its rightful place, as emperor of its own sovereign line of succession.

Patch attached.

Attachments (1)

35565.diff (503 bytes) - added by georgestephanis 2 years ago.

Download all attachments as: .zip

Change History (6)

#1 @ericlewis
2 years ago

  • Type changed from defect (bug) to enhancement

Although we don't usually refactor just because, this seems far off enough from our coding standards to warrant fixing.

#2 @ericlewis
2 years ago

  • Milestone changed from Awaiting Review to 4.5

#3 @SergeyBiryukov
2 years ago

  • Component changed from General to Media

#4 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 36373:

Media: In _wp_handle_upload(), move ending brace to a new line.

Props georgestephanis.
Fixes #35565.

#5 @johnbillion
2 years ago

  • Version changed from trunk to 4.0
Note: See TracTickets for help on using tickets.