[wp-trac] [WordPress Trac] #51557: Modernize: use explicit visibility for property declarations
WordPress Trac
noreply at wordpress.org
Sat Oct 17 14:40:18 UTC 2020
#51557: Modernize: use explicit visibility for property declarations
------------------------------+------------------------------
Reporter: jrf | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.6
Component: General | Version: trunk
Severity: minor | Keywords: has-patch commit
Focuses: coding-standards |
------------------------------+------------------------------
Using `var` or just and only `static` to declare a class property is PHP 4
code. PHP 5 introduced visibility modifiers.
This updates the code base to use explicit visibility modifier for
properties.
No review has been done on what the visibility of the properties
''should'' be as a property without visibility defaults to `public` and
changing that to a more closed visibility would be a BC-break.
Note: the same should be done for class methods at some point, but I
wouldn't want the fixes for that to interfere with patches for ticket
#51533, so I'm leaving that till later.
Related to #50767
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51557>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list