Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit fb7e3b7

Browse files
add phpcs to project and integrate it into travis-ci configuration
1 parent 2aa2870 commit fb7e3b7

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ before_script:
2626
- composer install
2727

2828
script:
29-
- composer test
29+
- composer cs
30+
- composer test

composer.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"name": "babymarkt/deepl-php-lib",
3-
"description": "DeepL API Client Library supporting PHP >= 5.3 && PHP < 8.0",
43
"type": "library",
4+
"description": "DeepL API Client Library supporting PHP >= 5.3 && PHP < 8.0",
5+
"keywords": [
6+
"babymarkt",
7+
"deepl",
8+
"i18n",
9+
"translation"
10+
],
11+
"homepage": "https://github.com/Baby-Markt/deepl-php-lib",
512
"license": "MIT",
613
"authors": [
714
{
@@ -14,7 +21,8 @@
1421
},
1522
"require-dev": {
1623
"php": ">=5.3 <8.0",
17-
"phpunit/phpunit": "^4.8"
24+
"phpunit/phpunit": "^4.8",
25+
"squizlabs/php_codesniffer": "^2.9"
1826
},
1927
"autoload": {
2028
"psr-4": {
@@ -27,8 +35,10 @@
2735
}
2836
},
2937
"scripts": {
30-
"test": [
31-
"vendor/bin/phpunit"
32-
]
38+
"test": "vendor/bin/phpunit",
39+
"cs": "vendor/bin/phpcs src tests"
40+
},
41+
"config": {
42+
"sort-packages": true
3343
}
34-
}
44+
}

phpcs.xml.dist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset name="babymarkt/deepl-php-lib">
3+
<description>The coding standard of deepl-php-lib package</description>
4+
<arg value="p" />
5+
6+
<config name="ignore_warnings_on_exit" value="1" />
7+
<config name="ignore_errors_on_exit" value="1" />
8+
9+
<arg name="colors" />
10+
<arg value="s" />
11+
12+
<!-- Use the PSR2 Standard-->
13+
<rule ref="PSR2" />
14+
</ruleset>

0 commit comments

Comments
 (0)