This repository is a simple Gulp example for PHP integrating PHPUnit, PHPlint, PHP_CodeSniffer, PHP Mess Detector, PHP Copy/Paste Detector, PHP Codebeautifier, PHP_Depend and PHPDoc.
At first, clone this repository to the location of your choice. Then install the required dependencies by:
composer install
sudo npm installThe php folder includes some sample PHP files. You can find according example unit test cases in the folder "tests".
Having all setup you can use the following commands (according to gulpfile.js):
Starts phplint
gulp phplintStarts the code sniffer using PSR-2 coding standard
gulp phpcseStarts the code beautifier using PSR-2 coding standard
gulp phpcbfStarts the mess detector
gulp phpmdStarts the metrics generator
gulp pdependStarts the copy/paste detector
gulp phpcpdStarts the unit tests
gulp phpunitGenerates an API documentation of the PHP files
gulp phpdocWatches the folder "php" for changes in php files and runs 'phplint', 'phpcs', 'phpunit', 'phpmd' and 'phpcpd'
gulp watch