Skip to content

Commit b779dc4

Browse files
committed
Add readme and use protonlabs package namespace
1 parent 2c534db commit b779dc4

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

Readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Proton PHP Coding Standards
2+
3+
## Installation & Usage
4+
5+
Install the package with composer
6+
7+
```sh
8+
composer req protonlabs/php-coding-standard --dev
9+
```
10+
11+
To use it in your phpcs xml, add a rule pointing to the ruleset.xml
12+
13+
```xml
14+
<?xml version="1.0"?>
15+
<ruleset name="ProtonLabs PHP CodeSniffer Standard">
16+
<!-- Proton Coding Standard – https://github.com/ProtonMail/php-coding-standard -->
17+
<rule ref="vendor/protonlabs/php-coding-standard/Proton/ruleset.xml">
18+
<!-- sniffs to exclude -->
19+
</rule>
20+
21+
<exclude-pattern>*/vendor/*</exclude-pattern>
22+
</ruleset>
23+
```

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
2-
"name": "proton/php-coding-standard",
2+
"name": "protonlabs/php-coding-standard",
33
"description": "ProtonMail Coding Standard",
44
"type": "phpcodesniffer-standard",
5+
"keywords": [
6+
"php-codesniffer", "coding-standard"
7+
],
8+
"homepage": "https://github.com/ProtonMail/php-coding-standard",
59
"minimum-stability": "dev",
610
"prefer-stable": true,
711
"require": {
812
"php": "^7.1",
913
"slevomat/coding-standard": "^4.8",
10-
"squizlabs/php_codesniffer": "^3.3.0"
14+
"squizlabs/php_codesniffer": "^3.3"
1115
},
1216
"license": "MIT"
1317
}

0 commit comments

Comments
 (0)