-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: PHP code quality | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- README.md | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
name: PHP_CodeSniffer | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
tools: cs2pr, phpcs | ||
|
||
- name: Run phpcs | ||
run: phpcs -q --report=checkstyle . | cs2pr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="Passbook"> | ||
|
||
<rule ref="PSR12"> | ||
<!-- We don't have line length (line width) limits. --> | ||
<exclude name="Generic.Files.LineLength"/> | ||
</rule> | ||
|
||
<!-- display progress --> | ||
<arg value="p"/> | ||
<arg name="colors"/> | ||
|
||
<!-- No lines with only whitespace --> | ||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> | ||
<properties> | ||
<property name="ignoreBlankLines" value="false"/> | ||
</properties> | ||
</rule> | ||
|
||
<!-- Ensure 1 blank line before and after functions, except at the top and bottom. --> | ||
<rule ref="Squiz.WhiteSpace.FunctionSpacing"> | ||
<properties> | ||
<property name="spacing" value="1" /> | ||
<property name="spacingBeforeFirst" value="0" /> | ||
<property name="spacingAfterLast" value="0" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"> | ||
<properties> | ||
<property name="spacing" value="1"/> | ||
<property name="spacingBeforeFirst" value="0" /> | ||
</properties> | ||
</rule> | ||
|
||
<exclude-pattern>/vendor/*</exclude-pattern> | ||
|
||
</ruleset> |