AzuraCast/phpcs.xml

76 lines
2.8 KiB
XML
Executable File

<?xml version="1.0"?>
<ruleset name="AzuraCast">
<description>The AzuraCast PHP coding standard.</description>
<file>config</file>
<file>src</file>
<file>web</file>
<file>tests/Functional</file>
<file>tests/Unit</file>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<!-- relative path from PHPCS source location -->
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="PSR12"/>
<!--
even though PSR12 defines the soft limit for line length at 120
we have a lot of line that barely exceed that, thus causing warnings
-->
<rule ref="Generic.Files.LineLength">
<exclude-pattern>src/Entity/Migration/*$</exclude-pattern>
<!--
It's not very practical to check for the line length here since the "solutions" to the
warnings would make the code partly less readable
-->
<exclude-pattern>src/Notification/Check/UpdateCheck.php</exclude-pattern>
<exclude-pattern>src/Radio/Backend/Liquidsoap/ConfigWriter.php</exclude-pattern>
<exclude-pattern>src/Installer/EnvFiles/*.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>tests/*$</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>src/Tests/Module.php</exclude-pattern>
<exclude-pattern>tests/*$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="false"/>
<property name="linesCountBeforeDeclare" value="1"/>
<property name="linesCountAfterDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
<exclude-pattern>src/Normalizer/DoctrineEntityNormalizer.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<exclude-pattern>src/Entity/Migration/*$</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
<exclude-pattern>config/*$</exclude-pattern>
</rule>
</ruleset>