Analyze using a specific rule level (0-7, higher is stricter)

phpstan

  • A PHP static analysis tool to discover bugs in code.
    More information: <https://github.com/phpstan/phpstan>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

phpstan analyse {{path/to/directory}} --level {{level}}

click the source code to copy