PHPackages                             tonoman3g/phpcs-variable-analysis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tonoman3g/phpcs-variable-analysis

ActiveLibrary

tonoman3g/phpcs-variable-analysis
=================================

A PHP\_CodeSniffer standard for Variable Analysis

110PHP

Since Jun 27Pushed 9y agoCompare

[ Source](https://github.com/tonoman3g/PHP_Codesniffer-VariableAnalysis)[ Packagist](https://packagist.org/packages/tonoman3g/phpcs-variable-analysis)[ RSS](/packages/tonoman3g-phpcs-variable-analysis/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP\_CodeSniffer VariableAnalysis
=================================

[](#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
------------

[](#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
-------------

[](#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 &amp; BUGS
-----------------------

[](#known-issues--bugs)

- File scope isn't currently analysed.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4a75ad25ee6de96b6a854dc90bd28c962a922189cb27e117401e6bf1788befa?d=identicon)[tonoman3g](/maintainers/tonoman3g)

---

Top Contributors

[![illusori](https://avatars.githubusercontent.com/u/360670?v=4)](https://github.com/illusori "illusori (63 commits)")[![arnested](https://avatars.githubusercontent.com/u/190005?v=4)](https://github.com/arnested "arnested (2 commits)")

### Embed Badge

![Health badge](/badges/tonoman3g-phpcs-variable-analysis/health.svg)

```
[![Health](https://phpackages.com/badges/tonoman3g-phpcs-variable-analysis/health.svg)](https://phpackages.com/packages/tonoman3g-phpcs-variable-analysis)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
