Skip to content

Commit 46b0c54

Browse files
committed
configure travis and phpcs
1 parent a939417 commit 46b0c54

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
language: php
2+
3+
php:
4+
- 5.6
5+
- 7.0
6+
- 7.1
7+
- 7.2
8+
- 7.3
9+
- nightly
10+
11+
matrix:
12+
fast_finish: true
13+
allow_failures:
14+
- php: nightly
15+
16+
sudo: false
17+
18+
before_install:
19+
- travis_retry composer self-update
20+
21+
install:
22+
- travis_retry composer require --no-update satooshi/php-coveralls:^1.0
23+
- travis_retry composer install --no-interaction --prefer-source
24+
25+
before_script:
26+
- mkdir -p build/logs
27+
28+
script:
29+
- ./vendor/bin/phpunit
30+
- ./vendor/bin/phpcs -sp
31+
32+
branches:
33+
only:
34+
- master
35+
- next

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
},
1919
"minimum-stability": "stable",
2020
"require": {
21-
"php": ">=5.5"
21+
"php": "^5.6|^7.0"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "^5.5"
24+
"phpunit/phpunit": "^5.7|^6.0",
25+
"squizlabs/php_codesniffer": "^2.3|^3.0"
2526
},
2627
"scripts": {
27-
"test": "phpunit"
28+
"test": "phpunit",
29+
"cs": "phpcs -sp"
2830
}
2931
}

phpcs.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<file>./src</file>
4+
<file>./test</file>
5+
<rule ref="PSR2" />
6+
</ruleset>

0 commit comments

Comments
 (0)