add php cs fixer

This commit is contained in:
isUnknown 2024-04-09 07:24:22 +02:00
parent 76b98eb2e3
commit 85a6807984
4 changed files with 49 additions and 6 deletions

24
.phpcs.xml Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<!-- Show progress -->
<arg value="p"/>
<!-- Paths to check -->
<file>site</file>
<exclude-pattern>site/plugins/*</exclude-pattern>
<file>site/plugins/kirby-page-block</file>
<!-- Include all rules from PSR-12 Coding Standard -->
<rule ref="PSR12"/>
<rule ref="Generic.Arrays.DisallowShortArraySyntax"/>
</ruleset>