FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16740&edit=1

ID: 16740
Updated by: gsherwood@squiz.net
Reported By: sb at sebastian-bergmann dot de
Summary: False positives for heredoc strings and unused
parameter sniff
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Irrelevant
Package Version: 1.2.0
PHP Version: 5.3.0
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on
pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.




Previous Comments:
------------------------------------------------------------------------

[2009-10-25 18:32:36] sebastian

Description:
------------
A function or method parameter that is only used in an heredoc string
is reported as not being used.

Test script:
---------------
<?php
function foo($bar)
{
print <<<BAZ
... $bar ...
BAZ
}

Expected result:
----------------
No violation.

Actual result:
--------------
FILE: /home/sb/test.php
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
2 | WARNING | The method parameter $bar is never used
--------------------------------------------------------------------------------

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 14, '10 at 4:46a
activeJan 14, '10 at 4:46a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase