chillu / phpmd-silverstripe
This package is abandoned and no longer maintained.
No replacement package was suggested.
Extended mess detection rules from phpmd for SilverStripe applications.
0.1.0
2015-07-08 10:11 UTC
Requires
- phpmd/phpmd: @stable
Requires (Dev)
- mockery/mockery: 0.9.4
- phpunit/phpunit: 4.7.6
- symfony/process: ~2.0
This package is not auto-updated.
Last update: 2018-01-08 14:17:34 UTC
README
Extended mess detection rules from phpmd for SilverStripe applications. The rules make it easier for developers to comply with the SilverStripe Coding Conventions. It uses mostly standard PHPMD rules, with a few notable changes:
- Replaced
UnusedPrivateField
withUnusedInstancePrivateField
rule, to check to instance fields only. Unused private statics are by design in SilverStripe. - Replaced
CamelCasePropertyName
withCamelCaseInstancePropertyName
rule. Static properties in SilverStripe are snake cased. - Removed inflexible checks around camelCase naming conventions
Installation
Global installation for usage across projects:
composer global require --prefer-dist chillu/phpmd-silverstripe
Local installation on an existing project:
composer require chillu/phpmd-silverstripe
Usage
For global installations:
~/.composer/vendor/bin/phpmd <my-project> text ~/.composer/vendor/chillu/phpmd-silverstripe/Rulesets/all.xml
For local installations:
vendor/bin/phpmd <my-project> text vendor/chillu/phpmd-silverstripe/Rulesets/all.xml
For more details, refer to the command line usage guides on phpmd.org.