Files
php-curl-class/tests/ruleset.xml
T
Zach Borboa a79e21b0d1 Fix PHP_CodeSniffer coding standard errors (#993)
* Fix PHP_CodeSniffer errors

Error message:
Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterTagBlock)

* Fix PHP_CodeSniffer errors

Error message:
Opening brace should be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine)

* Fix PHP_CodeSniffer warnings

Error message:
A file should declare new symbols (classes, functions, constants, etc.)
and cause no other side effects, or it should execute logic with side
effects, but should not do both. The first symbol is defined on line 6
and the first side effect is on line 14.
(PSR1.Files.SideEffects.FoundWithSymbols)
2025-09-15 21:24:22 -04:00

37 lines
1.5 KiB
XML

<?xml version="1.0"?>
<ruleset name="PSR12Modified">
<!-- Run against the PHPCompatibility ruleset. -->
<rule ref="PHPCompatibility">
<!-- TODO: Remove the following exclusion when this list() error is no longer incorrectly flagged. -->
<exclude name="PHPCompatibility.Lists.AssignmentOrder.Affected" />
</rule>
<config name="installed_paths" value="vendor/phpcompatibility/php-compatibility,vendor/phpcsstandards/phpcsutils/PHPCS23Utils" />
<!-- Run against the PSR12 ruleset with some exclusions. -->
<rule ref="PSR12">
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
<!-- TODO: Remove the following exclusion when ArrayUtil functions not in camel caps format like ArrayUtil::is_array_assoc() are removed. -->
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
</rule>
<!-- Allow side effects and symbols within files in the examples directory. -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>./examples/*</exclude-pattern>
</rule>
<!-- Prohibit long lines in php files. -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
<!-- Disable "No PHP code was found in this file" for symlinks. -->
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
</ruleset>