Edit report at https://pear.php.net/bugs/bug.php?id=19733&edit=1

ID: 19733
Updated by: gsherwood@squiz.net
Reported By: Chowarmaan at gmail dot com
Summary: Add variables to main CodeSniffer options similar to
classes, etc...
-Status: Open
+Status: Feedback
Type: Feature/Change Request
Package: PHP_CodeSniffer
Operating System: Windows 7
Package Version: 1.4.3
PHP Version: 5.4.8
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
There is an abstract class that allows you to quickly located member
vars, variables
and variable inside strings. Member vars have a function that can be
used to get
properties about them, including their scope.

And example of using this abstract class is this sniff:

If this the kind of thing that you are after or are you looking for
something more

Previous Comments:

[2012-12-06 16:06:16] chowarmaan

Our company has different coding rules based on variable scope. It
would be nice to be able to find all Public, Protected, Private, static
even, variables, and then test the format of the variables to conform to
a standard.

On the start of parsing, the file would need to get all variables first,
and their type. Obviously, variables within functions, etc... would
cause problems. I am thinking the main class scope variables would be
useful for the first pass.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedDec 6, '12 at 9:42p
activeDec 6, '12 at 9:42p

1 user in discussion

Gsherwood: 1 post



site design / logo © 2022 Grokbase