mirror of
https://github.com/Respect/Validation.git
synced 2026-03-18 08:09:51 +01:00
With this change, any rule can be used as a PHP attribute. I have wanted to implement this feature for a while, as it allows you to bind the validation to a specific property and just validate the object afterwards.
32 lines
1.1 KiB
XML
32 lines
1.1 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset
|
|
name="PHPCS Coding Standards for Respect"
|
|
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,phpt" />
|
|
<arg value="p" />
|
|
<arg value="s" />
|
|
|
|
<file>library/</file>
|
|
<file>tests/</file>
|
|
|
|
<rule ref="Respect" />
|
|
<rule ref="Generic.Files.LineLength.TooLong">
|
|
<exclude-pattern>tests/integration/</exclude-pattern>
|
|
</rule>
|
|
<rule ref="SlevomatCodingStandard.Attributes.AttributesOrder">
|
|
<properties>
|
|
<property name="order" type="array">
|
|
<element value="Attribute" />
|
|
<element value="Respect\Validation\Message\Template" />
|
|
</property>
|
|
</properties>
|
|
</rule>
|
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing">
|
|
<exclude-pattern>tests/integration/</exclude-pattern>
|
|
</rule>
|
|
</ruleset>
|