2020-03-19 16:47:08 +01:00
|
|
|
<?xml version="1.0"?>
|
2020-08-27 11:07:01 +03:00
|
|
|
<ruleset name="WooCommerce Coding Standards">
|
2021-08-19 10:12:44 +03:00
|
|
|
<description>WooCommerce PayPal Payments ruleset.</description>
|
2020-04-06 11:16:18 +03:00
|
|
|
|
2020-08-27 11:07:01 +03:00
|
|
|
<!-- Configs -->
|
2024-09-03 16:21:34 +03:00
|
|
|
<config name="minimum_supported_wp_version" value="6.3" />
|
|
|
|
<config name="testVersion" value="7.4-" />
|
2020-04-06 11:16:18 +03:00
|
|
|
|
2020-08-27 11:07:01 +03:00
|
|
|
<!-- Rules -->
|
2025-08-22 17:14:58 +02:00
|
|
|
<rule ref="WooCommerce-Core">
|
|
|
|
<exclude name="WordPress.Security.EscapeOutput.ExceptionNotEscaped" />
|
|
|
|
<exclude name="WordPress.WP.GetMetaSingle.Missing" />
|
|
|
|
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.Found" />
|
|
|
|
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed" />
|
|
|
|
<exclude name="Universal.Operators.DisallowShortTernary.Found" />
|
|
|
|
<exclude name="Universal.CodeAnalysis.NoEchoSprintf.Found" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.newFound" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.listFound" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.resourceFound" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.classFound" />
|
|
|
|
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.stringFound" />
|
|
|
|
</rule>
|
2020-08-27 11:07:01 +03:00
|
|
|
|
|
|
|
<rule ref="WordPress.WP.I18n">
|
2025-08-22 17:14:58 +02:00
|
|
|
<properties>
|
|
|
|
<property name="text_domain" type="array">
|
|
|
|
<element value="woocommerce-paypal-payments" />
|
|
|
|
</property>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
2020-08-27 11:07:01 +03:00
|
|
|
|
|
|
|
<rule ref="PHPCompatibility">
|
|
|
|
<exclude-pattern>tests/</exclude-pattern>
|
|
|
|
</rule>
|
2020-09-17 16:53:17 -03:00
|
|
|
|
2021-02-17 14:10:49 +01:00
|
|
|
<rule ref="WordPress">
|
|
|
|
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
|
|
|
|
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
|
2022-06-23 12:42:53 +02:00
|
|
|
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
|
2021-02-17 14:10:49 +01:00
|
|
|
</rule>
|
|
|
|
|
2022-06-23 12:04:44 +02:00
|
|
|
<rule ref="WooCommerce">
|
|
|
|
<exclude name="WooCommerce.Commenting.CommentHooks.MissingHookComment" />
|
|
|
|
<exclude name="WooCommerce.Commenting.CommentHooks.MissingSinceComment" />
|
|
|
|
</rule>
|
|
|
|
|
2022-06-15 16:20:43 +03:00
|
|
|
<rule ref="WooCommerce">
|
|
|
|
<exclude name="WooCommerce.Commenting.CommentHooks.MissingSinceComment" />
|
|
|
|
</rule>
|
|
|
|
|
2021-08-30 08:18:10 +02:00
|
|
|
<rule ref="Squiz.Commenting.FunctionComment">
|
|
|
|
<properties>
|
|
|
|
<property name="skipIfInheritdoc" value="true" />
|
|
|
|
</properties>
|
2025-06-20 09:57:34 +03:00
|
|
|
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
|
|
|
|
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
|
|
|
|
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
|
2021-08-30 08:18:10 +02:00
|
|
|
</rule>
|
2025-05-29 19:50:37 +03:00
|
|
|
<rule ref="Squiz.Commenting.VariableComment">
|
|
|
|
<exclude name="Squiz.Commenting.VariableComment.MissingVar" />
|
2025-06-20 09:57:34 +03:00
|
|
|
<exclude name="Squiz.Commenting.VariableComment.Missing" />
|
|
|
|
</rule>
|
|
|
|
<rule ref="Squiz.Commenting.FileComment">
|
|
|
|
<exclude name="Squiz.Commenting.FileComment.Missing" />
|
|
|
|
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
|
2025-05-29 19:50:37 +03:00
|
|
|
</rule>
|
2025-07-21 09:49:06 +02:00
|
|
|
<rule ref="Squiz.Commenting.ClassComment">
|
|
|
|
<exclude name="Squiz.Commenting.ClassComment.Missing" />
|
|
|
|
</rule>
|
2025-06-20 09:57:34 +03:00
|
|
|
<rule ref="Generic.Commenting.DocComment">
|
|
|
|
<exclude name="Generic.Commenting.DocComment.MissingShort" />
|
|
|
|
</rule>
|
|
|
|
|
2025-08-22 17:14:58 +02:00
|
|
|
<rule ref="WordPress.WP.Capabilities">
|
|
|
|
<properties>
|
|
|
|
<property name="custom_capabilities" type="array">
|
|
|
|
<element value="manage_woocommerce"/>
|
|
|
|
</property>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
|
2020-09-17 16:53:17 -03:00
|
|
|
<arg name="extensions" value="php"/>
|
2023-03-14 16:40:20 +02:00
|
|
|
<file>api</file>
|
2021-02-17 14:25:42 +01:00
|
|
|
<file>src</file>
|
|
|
|
<file>modules</file>
|
|
|
|
<file>woocommerce-paypal-payments.php</file>
|
2021-09-14 08:30:30 +02:00
|
|
|
<file>modules.php</file>
|
|
|
|
<file>bootstrap.php</file>
|
2025-01-10 17:42:31 +04:00
|
|
|
<file>scoper.inc.php</file>
|
2020-09-17 16:53:17 -03:00
|
|
|
|
|
|
|
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
|
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
|
|
<exclude-pattern>./tests/*</exclude-pattern>
|
2021-08-19 10:12:15 +03:00
|
|
|
<exclude-pattern>*/resources/*</exclude-pattern>
|
2022-12-20 16:04:11 +02:00
|
|
|
<exclude-pattern>*.asset.php</exclude-pattern>
|
2020-03-19 16:47:08 +01:00
|
|
|
</ruleset>
|