TASK: Add php linting

To make sure there are no syntax errors in files.
This commit is contained in:
Daniel Siepmann 2017-12-14 22:42:05 +01:00
parent c11283119b
commit 227ca8a035
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 18 additions and 0 deletions

14
.travis.yml Normal file
View file

@ -0,0 +1,14 @@
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
install:
- composer install
script:
- composer lint
- composer cgl

View file

@ -20,6 +20,10 @@
},
"scripts": {
"lint": [
"! find Classes -type f -name \"*.php\" -exec php -d error_reporting=32767 -l {} \\; 2>&1 >&- | grep \"^\"",
"! find Tests -type f -name \"*.php\" -exec php -d error_reporting=32767 -l {} \\; 2>&1 >&- | grep \"^\""
],
"cgl": [
"./vendor/bin/phpcs"
],
"post-install-cmd": [