cvs: pear /PHP_CodeSniffer CodeSniffer.php /PHP_CodeSniffer/CodeSniffer File.php
| From: | Greg Sherwood | Date: | Tue, 10 Oct 2006 05:13:44 +0000 |
| Subject: | cvs: pear /PHP_CodeSniffer CodeSniffer.php /PHP_CodeSniffer/CodeSniffer File.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42475@lists.php.net to get a copy of this message | ||
squiz Tue Oct 10 05:13:44 2006 UTC
Modified files:
/pear/PHP_CodeSniffer CodeSniffer.php
/pear/PHP_CodeSniffer/CodeSniffer File.php
Log:
Show start and end of debug output blocks
http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer.php?r1=1.7&r2=1.8&diff_format=u
Index: pear/PHP_CodeSniffer/CodeSniffer.php
diff -u pear/PHP_CodeSniffer/CodeSniffer.php:1.7 pear/PHP_CodeSniffer/CodeSniffer.php:1.8
--- pear/PHP_CodeSniffer/CodeSniffer.php:1.7 Tue Oct 10 02:23:14 2006
+++ pear/PHP_CodeSniffer/CodeSniffer.php Tue Oct 10 05:13:43 2006
@@ -381,6 +381,9 @@
if (PHP_CODESNIFFER_VERBOSITY > 0) {
$startTime = time();
echo 'Processing '.basename($file).' ';
+ if (PHP_CODESNIFFER_VERBOSITY > 1) {
+ echo "\n";
+ }
}
$phpcsFile = new PHP_CodeSniffer_File($file, $this->_listeners);
http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/File.php?r1=1.6&r2=1.7&diff_format=u
Index: pear/PHP_CodeSniffer/CodeSniffer/File.php
diff -u pear/PHP_CodeSniffer/CodeSniffer/File.php:1.6 pear/PHP_CodeSniffer/CodeSniffer/File.php:1.7
--- pear/PHP_CodeSniffer/CodeSniffer/File.php:1.6 Tue Oct 10 05:08:01 2006
+++ pear/PHP_CodeSniffer/CodeSniffer/File.php Tue Oct 10 05:13:44 2006
@@ -772,6 +772,10 @@
*/
private function _createScopeMap()
{
+ if (PHP_CODESNIFFER_VERBOSITY > 1) {
+ echo "\t*** START SCOPE MAP ***\n";
+ }
+
$numTokens = count($this->_tokens);
for ($i = 0; $i < $numTokens; $i++) {
// Check to see if the current token starts a new scope.
@@ -779,12 +783,16 @@
if (PHP_CODESNIFFER_VERBOSITY > 1) {
$type = $this->_tokens[$i]['type'];
$content = str_replace("\n", '\n',
$this->_tokens[$i]['content']);
- echo "\n\tStart scope map at $i: $type => $content\n";
+ echo "\tStart scope map at $i: $type => $content\n";
}
$i = $this->_recurseScopeMap($i);
}
}
+ if (PHP_CODESNIFFER_VERBOSITY > 1) {
+ echo "\t*** END SCOPE MAP ***\n";
+ }
+
}//end _createScopeMap()
@@ -989,6 +997,10 @@
*/
private function _createLevelMap()
{
+ if (PHP_CODESNIFFER_VERBOSITY > 1) {
+ echo "\t*** START LEVEL MAP ***\n";
+ }
+
$numTokens = count($this->_tokens);
$level = 0;
$conditions = array();
@@ -1142,6 +1154,10 @@
}//end if
}//end for
+ if (PHP_CODESNIFFER_VERBOSITY > 1) {
+ echo "\t*** END LEVEL MAP ***\n";
+ }
+
}//end _createLevelMap()