Forrest logo
tool overview
On this page you find all important commands for the CLI tool psalm. If the command you are looking for is missing please ask our AI.

psalm

Psalm is a command line tool and static analysis tool for PHP code. It is used to analyze and find errors and potential bugs or issues in PHP codebases. Psalm incorporates advanced type inference and code analysis techniques to provide accurate and fast static analysis.

It helps developers find errors early in the development process and ensures code quality and reliability. Psalm supports different levels of strictness based on the project's requirements and can be customized to suit specific needs.

The tool is easy to set up and integrate into existing PHP projects as it supports all major PHP versions. It supports a wide range of PHP language features and can handle modern PHP syntax and code patterns.

Psalm provides detailed and informative error messages and suggestions, making it easier for developers to understand and fix issues in their code. It also offers integration with popular IDEs, allowing developers to get real-time feedback and suggestions directly within their development environment.

Apart from identifying errors, Psalm also offers features like detecting unused or undefined variables, providing insights into unused code, and checking for issues related to code style or best practices.

The tool has a growing community and active development, ensuring continuous improvement and updates. It also has extensive documentation and a dedicated website that provides resources and guides on getting started, configuring, and using Psalm effectively.

Psalm is highly regarded in the PHP community and is trusted by many developers and companies to ensure code quality and maintainability in their PHP projects.

List of commands for psalm:

  • psalm:tldr:4ed92 psalm: Generate a Psalm configuration.
    $ psalm --init
    try on your machine
    explain this command
  • psalm:tldr:63eaf psalm: Include informational findings in the output.
    $ psalm --show-info
    try on your machine
    explain this command
  • psalm:tldr:ae54d psalm: Analyze the current working directory.
    $ psalm
    try on your machine
    explain this command
  • psalm:tldr:b6b02 psalm: Analyze a specific directory or file.
    $ psalm ${filename_or_directory}
    try on your machine
    explain this command
  • psalm:tldr:e4e55 psalm: Analyze a project in parallel with 4 threads.
    $ psalm --threads ${4}
    try on your machine
    explain this command
  • psalm:tldr:e771b psalm: Analyze a project and display statistics.
    $ psalm --stats
    try on your machine
    explain this command
  • psalm:tldr:f16e0 psalm: Analyze a project with a specific configuration file.
    $ psalm --config ${path-to-psalm-xml}
    try on your machine
    explain this command
tool overview