Skip to content

Commit d248c96

Browse files
committed
build: add new dependency & script to lint php files for syntax errors.
Also changed the OR operator single pipe (`|`) to use the double pipe (`||`) instead which is the new OR operator in newer composer versions.
1 parent 44650ca commit d248c96

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
],
1919
"require": {
2020
"php": ">=8.2",
21-
"squizlabs/php_codesniffer": "^3.7|^4.0",
21+
"squizlabs/php_codesniffer": "^3.7||^4.0",
2222
"dealerdirect/phpcodesniffer-composer-installer": "^1.1"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "^9.6|^11.5",
26-
"phpcsstandards/phpcsdevtools": "^1.0"
25+
"phpunit/phpunit": "^9.6||^11.5",
26+
"phpcsstandards/phpcsdevtools": "^1.0",
27+
"php-parallel-lint/php-parallel-lint": "^1.4"
2728
},
2829
"minimum-stability": "dev",
2930
"autoload": {
@@ -37,6 +38,7 @@
3738
}
3839
},
3940
"scripts": {
41+
"lint": "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git",
4042
"cs": "@php ./vendor/bin/phpcs --standard=yCodeTech",
4143
"cbf": "@php ./vendor/bin/phpcbf --standard=yCodeTech",
4244
"test": [
@@ -56,6 +58,7 @@
5658
"check-completeness": "@php ./vendor/bin/phpcs-check-feature-completeness ./yCodeTech"
5759
},
5860
"scripts-descriptions": {
61+
"lint": "Run PHP Parallel Lint to check for syntax errors in PHP files.",
5962
"cs": "Run PHPCS to check for coding standards violations.",
6063
"cbf": "Run PHPCBF to fix coding standards violations.",
6164
"test": "Run PHPUnit tests without code coverage.",

0 commit comments

Comments
 (0)