build(cs): add cs/stan configs

This commit is contained in:
Ondrej Vlach 2024-08-07 12:31:57 +02:00
parent b3dd6579c5
commit aa322eafdb
No known key found for this signature in database
GPG Key ID: 7F141CDACEDEE2DE
2 changed files with 38 additions and 0 deletions

30
phpcs.xml.dist Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<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"/>
<config name="installed_paths" value="vendor/slevomat/coding-standard"/>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DeclareStrictTypesSniff.php">
<properties>
<property name="spacesCountAroundEqualsSign">0</property>
</properties>
</rule>
<rule ref="PSR12"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="N"/>
<property name="absoluteLineLimit" value="M"/>
</properties>
</rule>
<file>app/</file>
<file>tests/</file>
</ruleset>

8
phpstan.neon.dist Normal file
View File

@ -0,0 +1,8 @@
parameters:
level: 8
paths:
- app/
- tests/
ignoreErrors:
- '#Call to an undefined static method App\\Models#'
- '#Access to an undefined property App\\Models#'