Skip to content

Commit 2898232

Browse files
committed
Add dependency on zetacomponents/coding-standard and run in CI.
1 parent ee17b8d commit 2898232

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

Diff for: .github/workflows/coding-standard.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Coding Standard
2+
3+
on:
4+
# Run on all pushes and on all pull requests.
5+
push:
6+
branches:
7+
master
8+
pull_request:
9+
# Allow manually triggering the workflow.
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
uses: "zetacomponents/.github/.github/workflows/coding-standard.yml@master"
15+

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/.pear
77
/composer.phar
88
.phpunit.result.cache
9+
.phpcs-cache

Diff for: composer.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,15 @@
5555
},
5656
"require-dev": {
5757
"phpunit/phpunit": "~8.0",
58-
"zetacomponents/unit-test": "^1.1.5"
58+
"zetacomponents/unit-test": "^1.1.5",
59+
"zetacomponents/coding-standard": "dev-main"
5960
},
6061
"suggest": {
6162
"ext-gd": "Used by the GD driver, one of the choices for generating bitmap images."
63+
},
64+
"config": {
65+
"allow-plugins": {
66+
"dealerdirect/phpcodesniffer-composer-installer": true
6267
}
68+
}
6369
}

Diff for: phpcs.xml.dist

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<arg name="basepath" value="."/>
4+
<arg name="extensions" value="php"/>
5+
<arg name="cache" value=".phpcs-cache"/>
6+
<arg name="colors"/>
7+
8+
<!-- Ignore warnings, show progress of the run and show sniff names -->
9+
<arg value="nps"/>
10+
11+
<config name="php_version" value="70200"/>
12+
13+
<file>src</file>
14+
15+
<rule ref="ZetaComponents" />
16+
</ruleset>

0 commit comments

Comments
 (0)