Skip to content

Commit 7c512df

Browse files
committed
add PHP CodeSniffer and check coding style
1 parent b25a772 commit 7c512df

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ install:
7777

7878
test_script:
7979
- cd c:\projects\behat-code-coverage
80+
- bin\phpcs
8081
- phpdbg -qrr vendor\phpunit\phpunit\phpunit -vvv
8182

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ before_script:
1616
- composer validate
1717
- if [[ $deps = low ]]; then composer update --prefer-lowest --prefer-stable; else composer update; fi
1818

19-
script: ./bin/phpunit -vvv
19+
script:
20+
- bin\phpcs
21+
- ./bin/phpunit -vvv
2022

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919
- Version constraints in composer.json have been updated from `~` to `^`.
2020

2121

22+
## [3.2.1] - 2018-03-19
23+
24+
- Fix Text report generation #5
25+
2226
## [3.2.0] - 2017-10-17 - Guzzle 6.0 support release
2327

2428
- Updated `guzzlehttp/guzzle` requirement from `~4.0||~5.0` to `~6.0`. We are

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
},
3838
"require-dev": {
3939
"phpunit/phpunit": "^6.0",
40-
"mikey179/vfsStream": "1.6.*"
40+
"mikey179/vfsStream": "1.6.*",
41+
"squizlabs/php_codesniffer": "^3.2",
42+
"escapestudios/symfony2-coding-standard": "^3.1"
4143
},
4244
"suggest": {
4345
"ext-xdebug": "Xdebug extension is required to collect coverage via Xdebug driver and run tests",

phpcs.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<!-- leanphp/common-dev phpcs.xml example config -->
3+
<ruleset name="LeanPHP Coding Standard">
4+
<description>LeanPHP Coding Standard</description>
5+
6+
<!-- directories and files to scan -->
7+
<file>src</file>
8+
9+
<!-- directories and files to exclude -->
10+
<exclude-pattern>test</exclude-pattern>
11+
<exclude-pattern>tests</exclude-pattern>
12+
<exclude-pattern>*Spec.php</exclude-pattern>
13+
14+
<!-- uncomment for a summary instead of detailed report -->
15+
<!--<arg name="report" value="summary"/>-->
16+
<arg value="p"/>>
17+
18+
<!-- Use Symfony2 Coding Standard -->
19+
<rule ref="vendor/escapestudios/symfony2-coding-standard/Symfony"/>
20+
</ruleset>

0 commit comments

Comments
 (0)