Bug #19411 [Fbk]: magic method error on __construct()

From: Date: Tue, 08 May 2012 21:02:57 +0000
Subject: Bug #19411 [Fbk]: magic method error on __construct()
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8628@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19411&edit=1 ID: 19411 Updated by: jpkeller@gmail.com Reported By: jpkeller at gmail dot com Summary: magic method error on __construct() Status: Feedback Type: Bug Package: PHP_CodeSniffer Operating System: Ubuntu Package Version: 1.3.3 PHP Version: 5.3.5 Assigned To: squiz Roadmap Versions: New Comment: Thanks for the quick response - I'll clarify. My occasionally I mean it doesn't error on every __construct() we have and I haven't been able to suss out the pattern of which it has problems with and which it does not. These projects are all hosted on the same server / use the same version of PHP / same version of PHPCS. We use basic PEAR standards without customization. For standards training (punishment?) we occasionally have devs bring a random file under standards - I'll e-mail you a copy of the most recent file we've run into it on. Previous Comments: ------------------------------------------------------------------------ [2012-05-08 05:26:46] squiz -Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz I can't replicate this. What exactly does "occasionally" mean? The exact same version of PHPCS, PHP and the code you are checking sometimes produces different results, or that PHPCS used on different setups or code is causing issues? Either way, are you able to provide me with code that I can run PHPCS over to make it fail? Also, what standard are you using? Is it a built-in one or a custom one? ------------------------------------------------------------------------ [2012-05-08 03:10:23] vanderhuge Description: ------------ Occasionally we've been running into errors where phpcs is reporting valid magic functions as invalid due to the double underscore. "156 | ERROR | Function name "__construct" is invalid; only PHP magic methods should be prefixed with a double underscore" ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19411&edit=1

« previous php.pear.bugs (#8628) next »