[wp-trac] [WordPress Trac] #38597: WP_Network::id is not a magic property

WordPress Trac noreply at wordpress.org
Tue Nov 1 17:18:08 UTC 2016


#38597: WP_Network::id is not a magic property
-----------------------------+-------------------------
 Reporter:  johnjamesjacoby  |       Owner:  jeremyfelt
     Type:  defect (bug)     |      Status:  reviewing
 Priority:  normal           |   Milestone:  4.7
Component:  General          |     Version:  4.6
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |     Focuses:  multisite
-----------------------------+-------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:3 flixos90]:
 > @jeremyfelt Yes, that's probably the reason we put it there. The
 `@property` needs to remain there so that IDEs etc recognize this property
 as public.

 If the concern is IDEs and documentation coverage, the current approach
 isn't quite right either. Now it's declared in two places: the class
 itself, and the docblock, and they are in conflict with each other (and my
 IDE complains about the overlap.)

 `@property` is also reserved for invisible magic variables, not known ones
 (in this case, defined in the class object.)

 Having it wrong is worse than not having it at all. I'd still  ore ro
 remove it until we decide what is most accurate.

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


More information about the wp-trac mailing list