> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# phpstan

> phpstan is a linter for PHP

[**phpstan**](https://phpstan.org/) is a linter for PHP.

You can enable the phpstan linter with:

```shell theme={null}
trunk check enable phpstan
```

## Auto Enabling

phpstan will never be auto-enabled. It must be enabled manually.

## Settings

phpstan supports the following config files:

* `phpstan.neon`
* `phpstan.neon.dist`
* `phpstan.dist.neon`

You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linters](../configure-linters#moving-linters) for more info.

## Links

* [phpstan site](https://phpstan.org/)
* phpstan Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/phpstan)
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
