[wp-trac] [WordPress Trac] #56293: Use 'MINUTE_IN_SECONDS' for consistency in 'update.php' file

WordPress Trac noreply at wordpress.org
Wed Jul 27 14:21:30 UTC 2022


#56293: Use 'MINUTE_IN_SECONDS' for consistency in 'update.php' file
----------------------------+-------------------------------
 Reporter:  hztyfoon        |       Owner:  audrasjb
     Type:  defect (bug)    |      Status:  reviewing
 Priority:  normal          |   Milestone:  6.1
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  coding-standards
----------------------------+-------------------------------

Comment (by hztyfoon):

 hey @krupalpanchal ,
 I checked your `56293.diff​` and looks to me your changes aren't what I
 suggested.

 To me,
 `2 * HOUR_IN_SECONDS` makes more sense than `( MINUTE_IN_SECONDS / 30 ) *
 HOUR_IN_SECONDS`
 same goes for the other line's change.

 Because, When I see `2 * HOUR_IN_SECONDS` it clearly makes me understand
 that it's twice an hour in seconds but when there's something like `(
 MINUTE_IN_SECONDS / 30 ) * HOUR_IN_SECONDS` it makes it more hard to read.

 My point was these `constants` like (`MINUTE_IN_SECONDS`,
 `HOUR_IN_SECONDS`) can make the timing numbers more readable for a non
 programmer. But, I don't see how your changes make it more readable.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56293#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list