You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,15 @@
4
4
5
5
Plugin for PHP_CodeSniffer static analysis tool that adds analysis of problematic variable use.
6
6
7
-
* Performs static analysis of variable use.
8
-
* Warns on use of undefined variables.
9
-
* Warns if variables are set or declared but never used within that scope.
10
-
* Warns if variables are redeclared within same scope.
7
+
* Warns if variables are used without being defined.
8
+
* Warns if variables are set or declared but never used.
11
9
* Warns if $this, self::$static_member, static::$static_member is used outside class scope.
12
10
13
11
## Installation
14
12
15
13
### Requirements
16
14
17
-
VariableAnalysis requires PHP 5.4 or higher and [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) version **3.0.2** or higher.
15
+
VariableAnalysis requires PHP 5.6 or higher and [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) version **3.0.2** or higher.
18
16
19
17
### With PHPCS Composer Installer
20
18
@@ -95,9 +93,24 @@ This was forked from the excellent work in https://github.com/illusori/PHP_Codes
95
93
96
94
Please open issues or PRs on this repository.
97
95
96
+
Any changes should be accompanied by tests and should pass linting and static analysis. Please use phpdoc (rather than actual types) for declaring types since this must run in PHP 5.6.
97
+
98
98
To run tests, make sure composer is installed, then run:
0 commit comments