Bug #19394 [Opn->Csd]: Notice in NonExecutableCodeSniff

From: Date: Mon, 23 Apr 2012 04:35:04 +0000
Subject: Bug #19394 [Opn->Csd]: Notice in NonExecutableCodeSniff
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8576@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19394&edit=1 ID: 19394 Updated by: gsherwood@squiz.net Reported By: aik dot bold at gmail dot com Summary: Notice in NonExecutableCodeSniff -Status: Open +Status: Closed Type: Bug Package: PHP_CodeSniffer Operating System: Linux Package Version: 1.3.3 PHP Version: 5.3.9 -Assigned To: +Assigned To: squiz Roadmap Versions: New Comment: -Status: Open +Status: Closed -Assigned To: +Assigned To: squiz Turned out to be a problem with conditional exit statements, like: defined('FOO') or die('error'); Fixed in git repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/21bb0eab5083c54ab12bb61ae 8a4fb5aa0e8e4fc Previous Comments: ------------------------------------------------------------------------ [2012-04-21 18:04:54] aik099 I was trying to analyze In-Portal CMS opensource project code at http://source.in-portal.org/in-portal/branches/5.2.x/ location. ------------------------------------------------------------------------ [2012-04-21 18:00:57] aik099 Description: ------------ I'm getting very much errors, when trying to apply "Sonar Way" profile for "Code Sniffer": 18:51:42.744 INFO .u.c.CommandExecutor - Notice: Undefined index: scope_closer in /usr/local/lib/php/PHP/CodeSniffer/Standards/Squiz/Sniffs/PH P/NonExecutableCodeSniff.php on line 209 18:51:42.745 INFO .u.c.CommandExecutor - PHP Notice: Undefined index: scope_closer in /usr/local/lib/php/PHP/CodeSniffer/Standards/Squiz/Sniffs/PH P/NonExecutableCodeSniff.php on line 209 Obviously that "scope_cleaner" key should be present after scanned php file is tokenized, but it's not present. ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19394&edit=1

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