TLDR; A static analyzer for PHP. It helps you catch common mistakes in your PHP code.
These are the current checks implemented.
- Extending undefined classes.
- Methods without modifiers(private, public & protected).
- Classes that start with a lowercase.
- Check if method exists when being called inside another method.
- Methods that return a value without defining a return type.
- Constants that have all letters in lowercase.
- Parameters without any type.
- Correct location for the PHP opening tag.
How to compile and run
To successfully run this project you will need to first install the rust toolchain. If everything was installed successfully you will need to download this project and run cargo build
. This command will compile the source code and create an executable. The executable is located inside the target/debug
folder. Run this executable inside of your PHP project.
Container
You can also use the docker image. Run the docker images inside your PHP project.
$ docker run -v $(pwd):/var/src ghcr.io/denzyldick/phanalist:latest
Preview
In this example phanalist is analysing 1 php file.