fastbolt/entity-importer

View on GitHub
phpcs.xml.dist

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>

<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         name="PHP_CodeSniffer"
         xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
    <description>Fastbolt coding standard</description>

    <file>src</file>
    <file>tests</file>

    <arg name="basepath" value="."/>
    <arg name="colors"/>
    <arg name="parallel" value="75"/>
    <arg value="np"/>

    <config name="installed_paths"
            value="vendor/fig-r/psr2r-sniffer,vendor/slevomat/coding-standard,vendor/spryker/code-sniffer"/>

    <!-- Don't hide tokenizer exceptions -->
    <rule ref="Internal.Tokenizer.Exception">
        <type>error</type>
    </rule>

    <rule ref="PSR12">
        <exclude name="Generic.WhiteSpace.ScopeIndent"/>
        <exclude name="PSR2.Methods.FunctionCallSignature"/>
        <exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterClosingBrace"/>
        <exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"/>
    </rule>

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
        <properties>
            <property name="ignoreBlankLines" value="true"/>
        </properties>
    </rule>

    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>

    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
    <rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>

    <rule ref="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall"/>
    <rule ref="SlevomatCodingStandard.PHP.ShortList"/>
    <rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
    <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>

    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
    <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
    <rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing"/>
    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>

    <rule ref="PSR2R.Namespaces.UnusedUseStatement"/>
    <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
        <properties>
            <property name="searchAnnotations" value="true"/>
        </properties>
    </rule>

    <rule ref="Spryker.Commenting.DocBlock">
        <exclude-pattern>tests/</exclude-pattern>
    </rule>
    <rule ref="Spryker.Commenting.FileDocBlock"/>
</ruleset>