Update inspections.md

Signed-off-by: Dennis Eichhorn <spl1nes.com@googlemail.com>
This commit is contained in:
Dennis Eichhorn 2023-10-19 00:09:55 +02:00 committed by GitHub
parent 933fa409fe
commit 042f89b818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,8 @@ Code inspections are very important in order to maintain the same code quality t
The following automated tests must pass without errors, failures and warnings for successful code changes:
* `php ./vendor/bin/phpstan analyse -l 9 -c Build/Config/phpstan.neon ./`
* `php vendor/bin/php-cs-fixer fix ./ --config=Build/Config/.php-cs-fixer.php --allow-risky=yes`
* `php vendor/bin/phpcbf --standard=Build/Config/phpcs.xml ./`
* `php ./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml"`
* `php ./vendor/bin/phpunit -c tests/phpunit_no_coverage.xml`
* `php ./vendor/bin/rector process --config Build/Config/rector.php --dry-run ./`
@ -121,11 +123,11 @@ Tools used for the code inspection are:
* PHPStan
* Jasmine
* PHPCS
* PHP CS Fixer
* PHP CBF
* Rector
* Custom scripts/tools
These tools are all installed by running the `setup.sh` script from the Build repository.
### PHPUnit
This application uses PHPUnit as unit testing framework. Unit tests for specific classes need to be named in the same manner as the testing class.
@ -176,6 +178,22 @@ php vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml" -s --re
> Many IDEs allow to integrate phpcs rules/configuration files for automatic checks in the editor
### PHP CS Fixer
The php code base has a defined code style standard. The following command automatically fixes some of the violations
```sh
php vendor/bin/php-cs-fixer fix ./ --config=Build/Config/.php-cs-fixer.php --allow-risky=yes
```
### PHP CBF
The php code base has a defined code style standard. The following command automatically fixes some of the violations
```sh
php vendor/bin/phpcbf --standard=Build/Config/phpcs.xml ./
```
### Rector
```sh