@@ -200,28 +200,31 @@ Quality of your code
200
200
201
201
Quality of code is auto-verified by php-cs-fixer, php code sniffer and php mess detector.
202
202
203
- Before a commit, launch the quality script :
203
+ Before a commit, install the quality scripts :
204
204
205
205
.. code-block :: bash
206
+ docker exec spatial-php8 composer update --working-dir=quality/php-cs-fixer
207
+ docker exec spatial-php8 composer update --working-dir=quality/php-code-sniffer
208
+ docker exec spatial-php8 composer update --working-dir=quality/php-mess-detector
209
+ docker exec spatial-php8 composer update --working-dir=quality/php-stan
206
210
207
- docker spatial-php8 composer check-quality-code
208
-
209
- You can launch PHPCS-FIXER to fix errors with:
211
+ Then, you can check the quality of your code with:
210
212
211
213
.. code-block :: bash
212
214
213
- docker spatial-php8 composer phpcsfixer
214
-
215
- You can launch PHP Code Sniffer only with:
216
- .. code-block :: bash
215
+ docker exec spatial-php8 quality/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=quality/php-cs-fixer/.php-cs-fixer.php --dry-run --allow-risky=yes
216
+ docker exec spatial-php8 quality/php-stan/vendor/bin/phpstan analyse --configuration=quality/php-stan/php-stan.neon lib tests --error-format=table --no-progress --no-interaction --no-ansi --level=9 --memory-limit=256M
217
+ docker exec spatial-php8 quality/php-mess-detector/vendor/bin/phpmd lib text quality/php-mess-detector/ruleset.xml
218
+ docker exec spatial-php8 quality/php-mess-detector/vendor/bin/phpmd tests text quality/php-mess-detector/test-ruleset.xml
219
+ docker exec spatial-php8 quality/php-code-sniffer/vendor/bin/phpcs --standard=quality/php-code-sniffer/phpcs.xml -s
217
220
218
- docker spatial-php8 composer phpcs
219
-
220
- You can launch PHP Mess Detector only with:
221
+ You can launch PHPCS-FIXER to fix errors with:
221
222
222
223
.. code-block :: bash
223
224
224
- docker spatial-php8 composer phpmd
225
+ docker exec spatial-php8 quality/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=quality/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
226
+
227
+ Fix all errors, then commit your code.
225
228
226
229
.. _Common directory : https://github.com/longitude-one/doctrine-spatial/tree/master/lib/LongitudeOne/Spatial/ORM/Query/AST/Functions/Common
227
230
.. _MySql directory : https://github.com/longitude-one/doctrine-spatial/tree/master/lib/LongitudeOne/Spatial/ORM/Query/AST/Functions/MySql
0 commit comments