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

WordPress Trac noreply at wordpress.org
Sun Jul 31 08:54:08 UTC 2022


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

Comment (by hztyfoon):

 Replying to [comment:21 costdev]:
 > Taking a snippet from [https://github.com/WordPress/wordpress-
 develop/pull/3029#discussion_r933915888 a review comment] I left on the
 PR:

 Thanks @costdev 😊
 I've checked your review in the PR. Timeout seconds like `35`, `55` (may
 be even `45`) doesn't sound standard to me. I'm not sure if these are used
 anywhere in the core codebase. If these are used, then I don't suppose
 using `MINUTE_IN_SECONDS / 2 + 5` instead of `35` would be more readable.
 Same goes for `55` & `45`.

 for `30` however, both `MINUTE_IN_SECONDS / 2` & `0.5 * MINUTE_IN_SECONDS`
 can make more sense than plain `30` IMO.

 Just noting, if your proposed `for known values, I'd suggest that we only
 make use of MINUTE_IN_SECONDS when the value exceeds 59 seconds` is
 implemented then we may do that throughout the codebase for consistency.
 Same goes for the 4 instances of `MINUTE_IN_SECONDS / 2` in [53714].

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


More information about the wp-trac mailing list