[wp-trac] [WordPress Trac] #56293: Use 'MINUTE_IN_SECONDS' for consistency in 'update.php' file
WordPress Trac
noreply at wordpress.org
Sun Jul 31 20:01:03 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 dev-feedback | Focuses: coding-standards
------------------------------------+-------------------------------
Changes (by costdev):
* keywords: has-patch => has-patch dev-feedback
Comment:
> in the case of 90, wouldn't "plain 90 with an added comment beside it"
be better than 1.5 * MINUTE_IN_SECONDS? [note: `90` exceeds `59`] Any
thought?
I think that's a fair point. "90 seconds" is more commonly used than "one
and a half minutes" or "a minute and a half". While it breaks the
consistency of `exceeds 59`, I believe it's the only edge case.
That would mean, going forward, we would have (constant names are
obviously not real, just examples):
{{{#!php
<?php
define( 'WAIT', 5 ); // 5 seconds
define( 'RETRYING_IN', 10 ); // 10 seconds
define( 'UNZIP_TIMEOUT', 30 ); // 30 seconds
define( 'DB_UPGRADE_TIMEOUT', MINUTE_IN_SECONDS );
define( 'UNDERWATER_TIMEOUT', 90 ); // 90 seconds
define( 'FREE_PIZZA_TIMEOUT', 30 * MINUTE_IN_SECONDS );
define( 'ONE_HOUR_PHOTO_TIMEOUT', HOUR_IN_SECONDS );
}}}
What does everyone think of that format?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56293#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list