squizlabs/PHP_CodeSniffer — pull request #242 by aztech-dev (2014-09-02 13:12:00+00:00)
Title: Disable PHP4 style ctor's when __construct is present

Fix edge-case where classes having both a function with the same name as the class and a __construct function are incorrectly detected as using PHP4 style constructor.

As the PHP5 doc states :
> For backwards compatibility, if PHP 5 cannot find a __construct() function for a given class, and the class did not inherit one from a parent class, it will search for the old-style constructor function, by the name of the class

Meaning that a function named like the class is only considered a constructor if no __construct function is present.

This P/R does not handle cases where __construct is declared in a parent class.