[wp-trac] [WordPress Trac] #47678: Modernize/simplify current_user_can()
WordPress Trac
noreply at wordpress.org
Thu Jul 11 11:28:13 UTC 2019
#47678: Modernize/simplify current_user_can()
---------------------------------------------+-----------------------------
Reporter: jrf | Owner: jrf
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.3
Component: Role/Capability | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: coding-
| standards
---------------------------------------------+-----------------------------
Comment (by jrf):
FYI: Including all patches attached to this ticket, the build is still
passing: https://travis-ci.com/WordPress/wordpress-
develop/builds/118756852
> array() to [] and it will be perfect.
@knutsp Short array syntax is "sugar". It makes no functional difference,
has no performance benefits and depending on whom you speak to, decreases
code readability.
I'm with @swissspidy here. Let's keep this ticket focused on the spread
operator which with the implementations in the patches I've submitted so
far **does** actually have performance benefits and gets rid of a lot of
unnecessary function call overhead.
Whether short array syntax should be introduced or even allowed, is a
whole other discussion.
Also see the existing discussion about this here:
https://make.wordpress.org/core/2019/03/26/coding-standards-updates-for-
php-5-6/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47678#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list