Skip to content

justcoded/dockerize-php-code-analysis

Repository files navigation

⚠️ WARNING

PHP Code Code Analysis Tool commands moved to https://github.com/justcoded/git-extras repository.

Dockerized PHP Code Analysis Tool

This dockerized tool provides you Makefile commands to check and fix PHP code.
It's built on top of https://github.com/easy-coding-standard/easy-coding-standard library and uses some other supported packages to cover as many rules as possible.

Installation

  1. Download code.mk
  2. Include code.mk in your Makefile
include code.mk
  1. Use :)

Usage

This tool uses code. namespace for all the commands it provides.
Use make help if available in your project to see for available commands.
You can see details in code.mk file to be aware of all available commands.

Check code

make code.check
make code.check path=src/app/Http
make code.check.dirty
make code.check.diff
make code.check.diff branch=main

Fix code

make code.fix
make code.fix path=src/app/Http
make code.fix.dirty
make code.fix.diff
make code.fix.diff branch=main

Configure checker

  1. Publish the config
make code.config.publish
  1. Modify ecs.php file to fit your needs.

Update

You can download a fresh code.mk file using the following command:

make code.self-update