2019-06-24 07:38:41 +08:00
|
|
|
<?xml version="1.0"?>
|
2021-03-10 15:02:53 -06:00
|
|
|
<ruleset name="Winter CMS">
|
|
|
|
<description>The coding standard for Winter CMS.</description>
|
2019-06-24 07:38:41 +08:00
|
|
|
<rule ref="PSR2">
|
2019-06-25 17:42:40 +08:00
|
|
|
<!--
|
|
|
|
Exceptions to the PSR-2 guidelines as per our Developer Guide:
|
2021-03-10 15:02:53 -06:00
|
|
|
https://wintercms.com/help/guidelines/developer#psr-exceptions
|
2019-06-25 17:42:40 +08:00
|
|
|
-->
|
2019-06-24 07:38:41 +08:00
|
|
|
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
2019-06-25 17:42:40 +08:00
|
|
|
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
|
|
|
|
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />
|
2022-03-23 20:34:49 +08:00
|
|
|
<!--
|
|
|
|
We're not enforcing a line length limit
|
|
|
|
-->
|
|
|
|
<exclude name="Generic.Files.LineLength" />
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
<rule ref="Squiz.ControlStructures.ControlSignature">
|
|
|
|
<!-- We use 0 spaces before the colon for short (alternative) tags -->
|
|
|
|
<properties>
|
|
|
|
<property name="requiredSpacesBeforeColon" value="0" />
|
|
|
|
</properties>
|
2019-06-25 17:42:40 +08:00
|
|
|
</rule>
|
|
|
|
|
|
|
|
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
|
|
|
|
<!--
|
2019-07-02 15:34:41 +08:00
|
|
|
Migration files and tests do not need a namespace defined
|
2019-06-25 17:42:40 +08:00
|
|
|
-->
|
|
|
|
<exclude-pattern>*/database/migrations/*\.php</exclude-pattern>
|
2019-07-02 15:34:41 +08:00
|
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
2019-06-24 07:38:41 +08:00
|
|
|
</rule>
|
|
|
|
|
2019-07-18 22:50:37 +08:00
|
|
|
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
|
|
|
|
<!--
|
|
|
|
Test fixtures and cases can have multiple classes defined, only if they are directly related to the test, or are
|
|
|
|
extended classes
|
|
|
|
-->
|
|
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
|
|
</rule>
|
|
|
|
|
2022-03-23 20:34:49 +08:00
|
|
|
<arg name="extensions" value="php" />
|
|
|
|
<arg name="colors" />
|
|
|
|
|
2019-06-24 07:38:41 +08:00
|
|
|
<file>bootstrap/</file>
|
|
|
|
<file>config/</file>
|
|
|
|
<file>modules/</file>
|
2021-03-10 15:02:53 -06:00
|
|
|
<file>plugins/winter/demo/</file>
|
2019-06-25 17:42:40 +08:00
|
|
|
<file>tests/</file>
|
2019-06-24 07:38:41 +08:00
|
|
|
|
2019-07-18 22:50:37 +08:00
|
|
|
<!-- Ignore vendor files -->
|
2019-06-25 17:42:40 +08:00
|
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
2019-07-18 22:50:37 +08:00
|
|
|
<!-- Ignore this view file as fixing the issues in here will break the template -->
|
|
|
|
<exclude-pattern>modules/system/views/exception.php</exclude-pattern>
|
|
|
|
<!-- Ignore this test case completely as it's testing a parse error -->
|
|
|
|
<exclude-pattern>tests/fixtures/plugins/testvendor/goto/Plugin.php</exclude-pattern>
|
2019-06-24 07:38:41 +08:00
|
|
|
</ruleset>
|