Remove unnecessary constructors.
RC4: speedups
Merge pull request #377 from terrafrost/rc4-changes

RC4: speedups

* terrafrost/rc4-changes:
  RC4: speedups
Merge branch 'master' into php5

* master:
  RC4: speedups
Merge pull request #376 from bantu/UselessOverridingMethod

Remove unnecessary constructors.

* bantu/UselessOverridingMethod:
  Remove unnecessary constructors.
Merge branch 'master' into php5

* master:
  Remove unnecessary constructors.
Check for old-style constructor names via Code Sniffer.
Change constructors from class name to __construct().

This has been produced as follows:
<?php
$replace = $files = [];
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1]));
foreach ($it as $fileinfo) {
    if ($fileinfo->getExtension() === 'php') {
        $file = $fileinfo->getPathname();
        $content = file_get_contents($file);
        $files[$file] = $content;
        $tokens = token_get_all($content);
        foreach ($tokens as $key => $value) {
            if ($value[0] === T_CLASS) {
                $class = $tokens[$key + 2][1];
                $replace += array(
                    "$class::$class(" => "$class::__construct(",
                    "parent::$class(" => "parent::__construct(",
                    "function $class(" => "function __construct(",
                );
            }
        }
    }
}
foreach ($files as $file => $content) {
    file_put_contents(
        $file,
        str_replace(
            array_keys($replace),
            array_values($replace),
            $content
        )
    );
}