-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
2.0
-
None
-
Ubuntu 10.10
-
MOODLE_20_STABLE
-
Easy
I borrowed the Moodle Standard to use in a test of PHPCodeSniffer, I installed it into a current build of PHPCodeSniffer and tried to run it on the Moodle 1.9.10 code base. An unhandled exception was raised during the parsing of mnet/lib.php, causing phpcs to die.
Tracking the issue down, it appears that there's an error in the Standards/Moodle/Sniffs/Commenting/FunctionCommentSniff.php file where the class pointer doesn't get reset before each file. Therefore the stale class pointer from the previous file environment.php was leaking into the next file, lib.php, and it was pointing to a token which was not a class declaration.
I've attached a patch file that prevents the exception and the crash.
- will help resolve
-
MDL-19247 PHP CodeSniffer: tool for coding standard consistency
-
- Closed
-