Skip to content

herloct/docker-phpcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license Build Status

Supported tags and respective Dockerfile links

What is PHP_CodeSniffer and phpcs?

PHP_CodeSniffer's phpcs is a script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard.

https://github.com/squizlabs/PHP_CodeSniffer

How to use this image

Basic usage.

docker run --rm \
    --volume /local/path:/project \
    herloct/phpcs[:tag] [<options>]

For example, to check src directory against the PSR1 and PSR2 coding standard.

docker run --rm \
    --volume /local/path:/project \
    herloct/phpcs --standard=PSR1,PSR2 src

Volumes

  • /project: Your PHP project directory.