Skip to content

Commit 80ab32e

Browse files
committed
Documentation and style changes to satisfy phpcs
1 parent 56b77a7 commit 80ab32e

File tree

15 files changed

+364
-192
lines changed

15 files changed

+364
-192
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,30 @@ jobs:
4747
- name: PHPStan
4848
run: phpstan analyse
4949

50+
phpcs:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v5
54+
with:
55+
persist-credentials: false
56+
- name: Set up PHP 7.4
57+
uses: shivammathur/setup-php@v2
58+
with:
59+
php-version: '7.4'
60+
tools: phpcs
61+
- name: Cache Composer packages
62+
id: composer-cache
63+
uses: actions/cache@v4
64+
with:
65+
path: vendor
66+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-php-
69+
- name: Install dependencies
70+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
71+
- name: PHPCS
72+
run: phpcs src/ tests/
73+
5074
test:
5175
runs-on: ubuntu-latest
5276
strategy:

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/composer.lock
22
/vendor/
3-
/.buildpath
4-
/.project
5-
/.settings
3+
/docs/
4+
5+
/.phpunit.cache
6+
.phpunit.result.cache
7+
68
tests/config.json

phpcs.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Robtimus">
3+
<rule ref="PEAR">
4+
<exclude name="PEAR.Commenting.FileComment"/>
5+
</rule>
6+
<rule ref="Generic.Commenting.DocComment">
7+
<exclude-pattern>*/tests/*</exclude-pattern>
8+
</rule>
9+
<rule ref="Generic.Files.LineLength">
10+
<properties>
11+
<property name="lineLimit" value="150"/>
12+
</properties>
13+
</rule>
14+
<rule ref="PEAR.Commenting.ClassComment">
15+
<exclude-pattern>*/tests/*</exclude-pattern>
16+
</rule>
17+
<rule ref="PEAR.Commenting.ClassComment.MissingCategoryTag">
18+
<exclude-pattern>*</exclude-pattern>
19+
</rule>
20+
<rule ref="PEAR.Commenting.ClassComment.MissingLinkTag">
21+
<exclude-pattern>*</exclude-pattern>
22+
</rule>
23+
<rule ref="PEAR.Commenting.FunctionComment">
24+
<properties>
25+
<property name="minimumVisibility" value="protected"/>
26+
</properties>
27+
<exclude-pattern>*/tests/*</exclude-pattern>
28+
</rule>
29+
</ruleset>

0 commit comments

Comments
 (0)