Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Commit e5a8fcb

Browse files
Merge branch 'release/0.2.0'
2 parents 018878b + 4d8587c commit e5a8fcb

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
66

77
## Unreleased
88

9+
## 0.2.0 (2018-09-06)
10+
11+
### Changed
12+
13+
- Ignore strict type declaration in resource and config files
14+
915
## 0.1.3 (2018-09-05)
1016

1117
### Changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ composer require sebastiaanluca/php-codesniffer-ruleset --dev
3939

4040
Add it to your project `phpcs.xml` or `phpcs.xml.dist` ruleset:
4141

42-
```
42+
```xml
4343
<?xml version="1.0"?>
4444
<ruleset>
4545
<arg name="basepath" value="."/>
@@ -55,18 +55,20 @@ Add it to your project `phpcs.xml` or `phpcs.xml.dist` ruleset:
5555

5656
The following commands can be added to the `scripts` section of your `composer.json` file to check and fix invalid code. Some optional checks are also included to illustrate how they might work together to check all your code.
5757

58-
```
59-
"scripts": {
60-
"composer-validate": "@composer validate --no-check-all --strict",
61-
"codesniffer-check": "vendor/bin/phpcs --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1",
62-
"codesniffer-fix": "vendor/bin/phpcbf --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 || exit 0",
63-
"test": "vendor/bin/phpunit",
64-
"check": [
65-
"@composer-validate",
66-
"@codesniffer-check",
67-
"@test"
68-
]
69-
},
58+
```json
59+
{
60+
"scripts": {
61+
"composer-validate": "@composer validate --no-check-all --strict",
62+
"codesniffer-check": "vendor/bin/phpcs --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1",
63+
"codesniffer-fix": "vendor/bin/phpcbf --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 || exit 0",
64+
"test": "vendor/bin/phpunit",
65+
"check": [
66+
"@composer-validate",
67+
"@codesniffer-check",
68+
"@test"
69+
]
70+
}
71+
}
7072
```
7173

7274
### Sniffing code in PHPStorm

ruleset.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@
183183
</rule>
184184

185185
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
186+
<exclude-pattern>*/config/*</exclude-pattern>
187+
<exclude-pattern>*/resources/*</exclude-pattern>
186188
<properties>
187189
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
188190
<property name="newlinesCountAfterDeclare" value="2"/>

0 commit comments

Comments
 (0)