Sign inSign up

ysoffner/phpsniffer

By ysoffner

•Updated almost 6 years ago

Easy container for use https://github.com/squizlabs/PHP_CodeSniffer

Image
1

943

ysoffner/phpsniffer repository overview

License Build Status Version Layers Coverity

https://hub.docker.com/r/ysoffner/phpsniffer/⁠

⁠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.

⁠PHP Compatibility Coding Standard for PHP CodeSniffer

This is a set of sniffs for PHP CodeSniffer that checks for PHP version compatibility. It will allow you to analyse your code for compatibility with higher and lower versions of PHP.

⁠How to use this image

Basic usage.

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

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

docker run --rm \
    --volume /local/path:/project \
    ysoffner/phpsniffer \
    --standard=PSR1,PSR2 \
    file/path

Example, to use phpCompatibility.

docker run --rm \
    --volume /local/path:/project \
    ysoffner/phpsniffer \
    --standard=PHPCompatibility --extensions=php --runtime-set testVersion 7.1 \
    file/path

⁠Volumes

  • /project: Is your Workdir and PHP project directory.

based from herloct⁠

Tag summary

Content type

Image

Digest

Size

28.7 MB

Last updated

almost 6 years ago

docker pull ysoffner/phpsniffer