sirbrillig/phpcs-variable-analysis
Find undefined and unused variables with the PHP Codesniffer static analysis tool.
PHPNOASSERTION
Issues
- 1
- 0
Variable not marked as used in short open echo tag
#323 opened by biinari - 2
Handle constructor promotion with Nullable types
#320 opened by yokozawa0701 - 5
- 0
- 3
`squizlabs/PHP_CodeSniffer` is abandoned - Replace with `PHPCSStandards/PHP_CodeSniffer` when the time is right
#314 opened by Levivb - 0
Assignment of an array element counts as a read
#307 opened by sirbrillig - 0
Reduce use of array_... functions
#237 opened by sirbrillig - 23
- 2
- 0
- 6
Incorrect warning Variable $var is undefined.
#299 opened by bnoordsij - 2
Undefined variable error introduced in v2.11.15
#300 opened by srtfisher - 3
Ternary operator inside arrow function
#297 opened by tomrajnoha - 4
Unused function parameter in lambda function
#295 opened by ghnp5 - 5
- 2
- 1
Variable $this is undefined in enum
#288 opened by satiromarra - 2
- 5
Inline if-clause with short-list false positive
#263 opened by sybrew - 4
False-positive `UndefinedVariable` for static variable inside an anonymous function
#277 opened by shvlv - 1
- 2
Support of array desctructing
#271 opened by shvlv - 3
Incorrect warning for arguments to static methods that return "new static()"
#272 opened by rickdenhaan - 0
Remove php_errormsg from superglobals
#209 opened by sirbrillig - 1
Improve handling of initial values in initializers
#253 opened by jrfnl - 1
Handle constructor promotion
#227 opened by sirbrillig - 1
- 1
Add validUndefinedVariableNamesInFileScope
#243 opened by andrewnicols - 2
- 1
- 2
- 3
- 2
- 8
False positives
#228 opened by djibarian - 5
Update phpcs version in composer.json
#226 opened by coccoinomane - 2
Unused variable Being Flagged but its being Used inside the While loop
#224 opened by darthvader666uk - 2
undefined variable errors after isset checks
#225 opened by kkmuffme - 11
False positive for unused variable when variable is passed by reference in closure
#219 opened by MPParsley - 1
False positive for unused/undefined variable in arrow function when used inside double quotes
#220 opened by ocean90 - 2
- 1
Sniff for detecting single-use variables?
#212 opened by lkraav - 8
Mixing concatenating assignment operator and assigment operation results in false positive.
#183 opened by alexpott - 1
Undefined array inside if condition or loop incorrectly marks other uses as read
#210 opened by sirbrillig - 1
- 2
isset() check flagged as undefined variable
#202 opened by paulschreiber - 2
Undefined variable flagged in consecutive lines
#203 opened by paulschreiber - 1
- 0
Add validUndefinedVariableRegexp to README
#181 opened by sirbrillig - 10