HomePhabricator

Explicitly enumerate PHP magic methods

Description

Explicitly enumerate PHP magic methods

Summary: Explicitly list PHP magic methods (methods beginning with __) instead of assuming that all methods beginning with __ are okay in terms of naming conventions. These magic methods were obtained from http://us1.php.net/manual/en/language.oop5.magic.php.

Test Plan:

Warning  (XHP9) Naming Conventions
 Follow naming conventions: methods should be named using lowerCamelCase.

            1 <?php
            2
            3 class Foo {
 >>>        4     function __foo() {}
            5
            6     function _bar() {}
            7 }

Warning  (XHP9) Naming Conventions
 Follow naming conventions: methods should be named using lowerCamelCase.

            3 class Foo {
            4     function __foo() {}
            5
 >>>        6     function _bar() {}
            7 }

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10539

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Sep 22 2014, 10:06 PM
Reviewer
Blessed Reviewers
Differential Revision
D10539: Explicitly enumerate PHP magic methods
Parents
rARC670dccee47aa: Minor reordering of functions
Branches
Unknown
Tags
Unknown

Event Timeline