Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Variables plugin for PHP Codesniffer static analysis tool. (Up for adoption, I don't work in PHP any more)

License

Notifications You must be signed in to change notification settings

illusori/PHP_Codesniffer-VariableAnalysis

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP_CodeSniffer VariableAnalysis

Plugin for PHP_CodeSniffer static analysis tool that adds analysis of problematic variable use.

  • Performs static analysis of variable use.
  • Warns on use of undefined variables.
  • Warns if variables are set or declared but never used within that scope.
  • Warns if variables are redeclared within same scope.
  • Warns if $this, self::$static_member, static::$static_member is used outside class scope.

INSTALLATION

Run ./install.sh -h to get install help.

For a default install of PHP_Codesniffer via PEAR with PEAR in ~/pear you should be safe to just run ./install.sh to use the default options, then copy the rules from ruleset.xml into your own ruleset.xml.

CUSTOMIZATION

There's a variety of options to customize the behaviour of VariableAnalysis, take a look at the included ruleset.xml for commented examples of a configuration.

KNOWN ISSUES & BUGS

  • File scope isn't currently analysed.

About

Variables plugin for PHP Codesniffer static analysis tool. (Up for adoption, I don't work in PHP any more)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.