This flake provides the PHPStan application.
PHPStan is a PHP Static Analysis Tool. PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code.
The idea behind this tool is to have a quick up-and-running way to run PHPStan on any host with Nix and without requiring it in the project.
While being extremely stable for years, "flake" is an upcoming feature of the Nix package manager. In order to use it, you must explicitly enable it, please check the documentation to enable it, this is currently an opt-in option.
In your project directory, run:
nix run github:loophp/nix-phpstan
A working example in a PHP project:
nix run github:loophp/nix-phpstan -- analyze src/
or
nix run github:loophp/nix-phpstan -- --version
To see all the available options, run:
nix run github:loophp/nix-phpstan -- --help