scrutinizer-ci / phpmd

PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
http://phpmd.org
Other
0 stars 2 forks source link

Please fix wrong notice about old PHP construct #8

Open ovr opened 9 years ago

ovr commented 9 years ago

Here, you can explain why the found issue was invalid, and what result you would have expected otherwise.

Please also check that this issue has not already been reported.

class Factory {
    public static function factory($id, array $parameters, Service $service)
}

Error

Using PHP4-style constructors that are named like the class is not recommend; better use the more explicit __construct method.

Please check !$method->isStatic() before

see https://scrutinizer-ci.com/g/SocialConnect/auth/inspections/e3b853ab-234b-430f-a64a-0aca979526b4/issues/files/src/Provider/Factory.php?status=existing&orderField=path&order=asc&issueId=23c195b1-1cf6-4d38-ad20-25eb77456e7f