ralfmaxxx / phpmd_variable_lifetime
Deliver PHPMD variable lifetime rule
Installs: 692
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ralfmaxxx/phpmd_variable_lifetime
Requires
- phpmd/phpmd: ^2.4
This package is auto-updated.
Last update: 2025-09-21 22:47:44 UTC
README
PHPMD Variable Lifetime Rule
How to use?
composer require "ralfmaxxx/phpmd_variable_lifetime"
And append this rule to phpmd.xml
using definition file rulesets/design.xml
:
<rule ref="{path}/rulesets/design.xml/LocalVariableLifetime" />
You can additionally set allowed lines interval parameter:
<rule ref="{path}/rulesets/design.xml/LocalVariableLifetime">
<properties>
<property name="allowedLinesInterval" value="5"/>
</properties>
</rule>