Skip to content

Commit 3c20b67

Browse files
committed
Switch to PSR2 coding standard
1 parent 6ff4ccd commit 3c20b67

6 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Contribution Guidelines
2-
You are welcome to report [issues](/../../issues) or submit [pull requests](/../../pulls). While the below guidelines are necessary to get code merged, you can submit pull requests that do not adhere to them and I will try to take care of them in my spare time. If you can make sure the build is passing 100%, that would be very useful.
2+
You are welcome to report [issues](https://github.com/chadicus/dom-php/issues) or submit [pull requests](https://github.com/chadicus/dom-php/pulls). While the below guidelines are necessary to get code merged, you can submit pull requests that do not adhere to them and I will try to take care of them in my spare time. If you can make sure the build is passing 100%, that would be very useful.
33

44
I recommend including details of your particular usecase(s) with any issues or pull requests.
55

66
## Questions and Bug Reports
7-
Submit via [GitHub Issues](/../../issues).
7+
Submit via [GitHub Issues](https://github.com/chadicus/dom-php/issues).
88

99
## Pull Requests
10-
Code changes should be sent through [GitHub Pull Requests](/../../pulls). Before submitting the pull request, make sure that phpunit reports success:
10+
Code changes should be sent through [GitHub Pull Requests](https://github.com/chadicus/dom-php/pulls). Before submitting the pull request, make sure that phpunit reports success:
1111

1212
```sh
1313
./vendor/bin/phpunit --coverage-html coverage

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
composer.lock
33
clover.xml
44
phpunit.xml
5+
phpcs.xml

.scrutinizer.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
filter:
22
excluded_paths:
33
- 'vendor/*'
4-
- 'tests/*'
54
before_commands:
65
- 'composer install --prefer-source'
7-
checks:
8-
php:
9-
custom_coding_standard:
10-
git_repository: 'https://github.com/chadicus/coding-standard'
11-
git_version: '3264851a30a7305995998660ee239d1a3d1c311f'
12-
ruleset_path: 'Chadicus/ruleset.xml'
136
tools:
147
php_analyzer: true
158
php_mess_detector: true
9+
php_code_sniffer:
10+
config:
11+
standard: PSR2
1612
sensiolabs_security_checker: true
1713
php_loc:
1814
excluded_dirs:
1915
- vendor
20-
- tests
2116
php_pdepend: true
2217
php_sim: true
2318
build_failure_conditions:
24-
- 'elements.rating(<= B).new.exists'
19+
- 'elements.rating(< B).new.exists'
2520
- 'issues.label("coding-style").new.exists'
2621
- 'issues.severity(>= MAJOR).new.exists'
2722
- 'project.metric("scrutinizer.quality", < 8)'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ With a checkout of the code get [Composer](http://getcomposer.org) in your PATH
4545
```sh
4646
./composer install
4747
./vendor/bin/phpunit
48+
./vendor/bin/phpcs
4849
```

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"php": "^7.0"
1818
},
1919
"require-dev": {
20-
"chadicus/coding-standard": "^1.1.2",
20+
"php-coveralls/php-coveralls": "^2.1",
2121
"phpunit/phpunit": "^6.5",
22-
"php-coveralls/php-coveralls": "^2.1"
22+
"squizlabs/php_codesniffer": "^3.3"
2323
},
2424
"autoload": {
2525
"psr-4": { "Chadicus\\Csv\\": "src/" }

phpcs.xml.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="PHP_CodeSniffer">
3+
<file>src</file>
4+
<file>tests</file>
5+
<arg name="colors" />
6+
<arg value="p" />
7+
<rule ref="PSR2" />
8+
</ruleset>

0 commit comments

Comments
 (0)