We have added some development tools for you to contribute to the library with clean code:
PHP mess detector takes a given PHP source code base and look for several potential problems within that source. The following is a sample usage with all options available:
./vendor/bin/phpmd ./src text codesize,unusedcode,naming,design,controversial,cleancode
For further information, please visit PHP mess detector documentation
Global settings file: phpcs.xml.dist
(added into Git)
Local settings file (you can add it locally): phpcs.xml
(ignored by Git)
PHP_CodeSniffer
: ./vendor/bin/phpcs
./vendor/bin/phpcs --report=diff
./vendor/bin/phpcbf
For further information, please visit squizlabs/PHP_CodeSniffer
Global settings file: .php_cs.dist
(added into Git)
Local settings file (you can add it locally): .php_cs
(ignored by Git)
PHP-CS-Fixer
: ./vendor/bin/php-cs-fixer --config=.php_cs.dist fix ./src --dry-run
./vendor/bin/php-cs-fixer --config=.php_cs.dist fix ./src
For further information, please visit FriendsOfPHP/PHP-CS-Fixer
We are using PHPUnit
for testing the module. Do the following:
./vendor/bin/phpunit
© 2amigos 2013-2017