mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Document using PHPStan in local development environment.
This commit is contained in:
parent
059e058b6c
commit
b0a008097c
|
@ -4,7 +4,8 @@ farmOS follows [Drupal coding standards](https://www.drupal.org/docs/develop/sta
|
|||
|
||||
The farmOS development Docker image comes pre-installed with
|
||||
[PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for detecting
|
||||
code standard violations.
|
||||
code standard violations, and [PHPStan](https://phpstan.org) for static
|
||||
analysis. All farmOS code must pass both.
|
||||
|
||||
The following command will run PHP CodeSniffer on all farmOS code:
|
||||
|
||||
|
@ -16,3 +17,7 @@ In some cases, code standard violations can be fixed automatically with
|
|||
`phpcbf`:
|
||||
|
||||
docker exec -it -u www-data farmos_www_1 phpcbf /opt/drupal/web/profiles/farm
|
||||
|
||||
The following command will run PHPStan on all farmOS code:
|
||||
|
||||
docker exec -it -u www-data farmos_www_1 phpstan analyze /opt/drupal/web/profiles/farm
|
||||
|
|
Loading…
Reference in a new issue