[wp-trac] [WordPress Trac] #22234: Use access modifiers in classes, not the var keyword

WordPress Trac noreply at wordpress.org
Sat Oct 20 23:26:17 UTC 2012


#22234: Use access modifiers in classes, not the var keyword
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  General         |     Version:  1.5
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------------

Comment (by wonderboymusic):

 This is just a conversation starter. Every property being public in every
 class in the codebase might actually be just fine, but then the PHPDocs
 are useless. {{{@access private}}} on public properties and public
 functions accomplishes nothing. If it's supposed to say to a dev "don't
 use me" - let's enforce that and change / move / remove those functions at
 will. If it is being used to actually affect visibility, it doesn't. If
 it's being used to accurately explain visibility in generated docs, it
 doesn't.

 So are we trying to create documentation that is complete and accurate? We
 should, and let's do it with proper access modifiers AND proper PHPDocs,
 even if it requires changing them all to public.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22234#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list