Skip to content

Commit 3254403

Browse files
committed
First version of the coding standards
1 parent 9545455 commit 3254403

File tree

5 files changed

+575
-0
lines changed

5 files changed

+575
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

ChessZebra/ruleset.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="ChessZebra"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd">
5+
<description>The ChessZebra coding standards.</description>
6+
7+
<rule ref="Doctrine">
8+
<exclude name="Generic.Formatting.MultipleStatementAlignment"/>
9+
<exclude name="Generic.Formatting.SpaceAfterCast"/>
10+
<exclude name="Generic.Formatting.SpaceAfterNot"/>
11+
</rule>
12+
13+
<rule ref="Squiz.Commenting.FunctionComment">
14+
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
15+
</rule>
16+
17+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
18+
<properties>
19+
<property name="spacesCountBeforeColon" value="0"/>
20+
</properties>
21+
</rule>
22+
</ruleset>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# coding-standards
2+
23
This repository contains the coding standards for ChessZebra libraries and applications.

composer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "chesszebra/coding-standards",
3+
"type": "phpcodesniffer-standard",
4+
"description": "The ChessZebra coding standards for PHP_CodeSniffer.",
5+
"keywords": [
6+
"coding-standards",
7+
"coding",
8+
"standard",
9+
"standards",
10+
"cs",
11+
"code",
12+
"style",
13+
"sniffer",
14+
"rules",
15+
"sniffs",
16+
"checks",
17+
"chesszebra"
18+
],
19+
"homepage": "https://chesszebra.com",
20+
"license": "MIT",
21+
"require": {
22+
"php": "^7.2",
23+
"doctrine/coding-standard": "^7.0"
24+
},
25+
"require-dev": {
26+
"roave/security-advisories": "dev-master"
27+
},
28+
"autoload-dev": {
29+
"classmap": [
30+
"ChessZebra/"
31+
],
32+
"psr-4": {
33+
"ChessZebra\\SniffsTest\\": "tests/SniffsTest"
34+
}
35+
},
36+
"minimum-stability": "dev",
37+
"prefer-stable" : true,
38+
"config": {
39+
"optimize-autoloader": true,
40+
"process-timeout": 5000,
41+
"sort-packages": true
42+
}
43+
}

0 commit comments

Comments
 (0)