Skip to content

Commit a4a6cf4

Browse files
committed
Add travis configuration file
1 parent f3470cf commit a4a6cf4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: php
2+
php:
3+
- 5.5
4+
- 5.4
5+
- 5.3
6+
before_install:
7+
- pear config-set auto_discover 1
8+
- pear install pear/PHP_CodeSniffer
9+
- pear install pear.phpunit.de/phpcpd
10+
- phpenv rehash
11+
before_script:
12+
- git clone --branch=master --depth=1 --quiet git://github.com/WoltLab/WCF.git WCF
13+
- rm WCF/CodeSniff/WCF/Sniffs/Namespaces/ClassMustBeImportedSniff.php
14+
- rm WCF/CodeSniff/WCF/Sniffs/Namespaces/UseDeclarationSniff.php
15+
- sed -i 's/<rule ref="WCF.Namespaces.ClassMustBeImported" \/>//' WCF/CodeSniff/WCF/ruleset.xml
16+
- sed -i 's/<rule ref="WCF.Namespaces.UseDeclaration" \/>//' WCF/CodeSniff/WCF/ruleset.xml
17+
script:
18+
- find file -type f -name '*.php' |xargs -I file php -l file
19+
- phpcs -p --extensions=php --standard="`pwd`/WCF/CodeSniff/WCF" file
20+
- phpcpd --verbose --min-lines 10 file

0 commit comments

Comments
 (0)