diff --git a/.travis.yml b/.travis.yml index c08a02e..f275887 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,4 +30,4 @@ script: - > echo; echo "Linting all PHP files"; - find Classes/ Tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l; + composer php-lint; diff --git a/CHANGELOG.md b/CHANGELOG.md index ec24203..f65a883 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added +- Composer script for PHP linting ### Changed diff --git a/composer.json b/composer.json index 5021184..b54b33d 100644 --- a/composer.json +++ b/composer.json @@ -62,6 +62,7 @@ "vendor-dir": ".Build/vendor" }, "scripts": { + "php-lint": "find *.php Classes/ Configuration/ Tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l", "require-typo3-version": [ "@php -r '$conf=json_decode(file_get_contents(__DIR__.\"/composer.json\"),true);$conf[\"require\"][\"typo3/cms-core\"]=$_SERVER[\"argv\"][1];file_put_contents(__DIR__.\"/composer.json\",json_encode($conf,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT).chr(10));'", "@composer install"