PHP Linter image based on Official PHP Docker Image
This image may help you check if your PHP project is following PSR12 standard. Also it could check MobiDev PHP code sniffer rules.
Maintained by: Mobidev
Supported architectures: amd64
Open php-linter help information
docker run -it mobidevpublisher/php-linter -h
Run one of these commands from your project folder to get code sniffer report as a console output open your project folder and run one of this commands:
To run PSR12 checks:
docker run -it -v $PWD:/var/www/html mobidevpublisher/php-linter
Or
docker run -it -v $PWD:/var/www/html mobidevpublisher/php-linter -s psr12
To run MobiDev checks:
docker run -it -v $PWD:/var/www/html mobidevpublisher/php-linter -s mobidev
Also you could run PHP Code Sniffer manually on a file/dir:
docker run -it -v $PWD:/var/www/html mobidevpublisher/php-linter -m <file|dir>
Please run this command for PHP Code Sniffer usage information:
docker run -it -v $PWD:/var/www/html mobidevpublisher/php-linter -m --help
To run PHP Code Beautifier and Fixer for PSR12:
docker run -it -v $PWD:/var/www/html mobidevpublisher/php-linter -f
Docker Compose file example for Development environment
version: '3.5'
services:
php-linter:
image: mobidevpublisher/php-linter:3.7.1
volumes:
- ".:/var/www/html"
networks:
- local
mobidevpublisher/php-linter:<version>
Examples:
docker pull mobidevpublisher/php-linter:3.7.1
The MIT License
Copyright (c) 2009-2023 MobiDev Corporation [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Content type
Image
Digest
sha256:2255a41f0…
Size
166.4 MB
Last updated
about 2 hours ago
docker pull mobidevpublisher/php-linter