[wp-trac] [WordPress Trac] #30891: Unchecked property overloading is detrimental to OOP.
WordPress Trac
noreply at wordpress.org
Sat Jan 10 23:27:02 UTC 2015
#30891: Unchecked property overloading is detrimental to OOP.
--------------------------+------------------
Reporter: aercolino | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: General | Version: 4.0
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------
Comment (by wonderboymusic):
In [changeset:"31136"]:
{{{
#!CommitTicketReference repository="" revision="31136"
In `WP_MatchesMapRegex`:
* Exactly one method was made private in [28516], and is only used
internally.
* 2 properties were made private, but they just store variables passed to
the constructor.
* Instances of this class are never created in core.
`WP_MatchesMapRegex::apply()` is called statically in
`WP->parse_request()` and `url_to_postid()`.
The chances that:
1) this class is used as an instance somewhere and
2) the properties that have always been marked `@access private` and begin
with `_` were used publicly
...is extremely low.
Remove the magic methods, I should not have added them.
While we're at it, use the PHP5-style `__construct()` instead of the class
name.
See #30891.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30891#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list