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

ID: 18829
Updated by: gsherwood@squiz.net
Reported By: pear dot php dot net at illusori dot co dot uk
Summary: [Patch] AbstractVariableSniff HEREDOC support and
regexp fix
-Status: Open
+Status: Closed
-Type: Bug
+Type: Feature/Change Request
Package: PHP_CodeSniffer
Operating System: Irrelevant
Package Version: SVN
PHP Version: Irrelevant
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Type: Bug
+Type: Feature/Change Request
-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.

Thanks a lot for the patch.


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

[2011-09-12 22:12:05] illusori

Added #patch
bug:18829;patch:AbstractVariableSniff-heredoc;revision:1315861925;.

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

[2011-09-12 22:10:45] illusori

Description:
------------
Patch to add support for:
* spotting variables in HEREDOC strings to AbstractVariableSniff
* fixes the "variable in string" regexp so it will correctly detect
variables at the start of the string and corrects the backslash escaping
detection to be complete
* use same "am I a string?" detection for outside-scope as inside-scope
so it doesn't pass in function and class declarations to
processVariableInString().
* swap names of $listen and $scopes variables in constructor to match
their use and those in parent class.

Test script:
---------------
No tests since it's an abstract class, but these changes are backported
from a working class with test-suite in
https://github.com/illusori/PHP_Codesniffer-VariableAnalysis

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 13, '11 at 5:01a
activeSep 13, '11 at 5:01a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase