Skip to content

Gulp example for automating PHP code analysis, testing and documentation.

Notifications You must be signed in to change notification settings

cseifert/gulp-php-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-php-example

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.

Installation

At first, clone this repository to the location of your choice. Then install the required dependencies by:

composer install
sudo npm install

The php folder includes some sample PHP files. You can find according example unit test cases in the folder "tests".

Gulp commands

Having all setup you can use the following commands (according to gulpfile.js):

PHPLint

Starts phplint

gulp phplint

PHP_CodeSniffer

Starts the code sniffer using PSR-2 coding standard

gulp phpcse

PHP Codebeautifier

Starts the code beautifier using PSR-2 coding standard

gulp phpcbf

PHP Mess Detector

Starts the mess detector

gulp phpmd

PHP_Depend

Starts the metrics generator

gulp pdepend

PHP Copy/Paste Detector

Starts the copy/paste detector

gulp phpcpd

PHPUnit

Starts the unit tests

gulp phpunit

PHPDoc

Generates an API documentation of the PHP files

gulp phpdoc

Watch

Watches the folder "php" for changes in php files and runs 'phplint', 'phpcs', 'phpunit', 'phpmd' and 'phpcpd'

gulp watch

About

Gulp example for automating PHP code analysis, testing and documentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published