InfluxOW/laravel_ddd_ecommerce

View on GitHub
phpcs.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<ruleset name="PlatformApi">
    <description>PSR12 Laravel standards with tweaks.</description>

    <arg name="basepath" value="."/>
    <arg name="colors"/>
    <arg name="parallel" value="100"/>
    <arg value="np"/>
    <arg name="extensions" value="php"/>
    <arg name="cache" value="storage/phpcs"/>

    <file>app</file>
    <file>config</file>

    <rule ref="PSR12"/>

    <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
        <exclude-pattern>*/Database/Migrations/*</exclude-pattern>
        <exclude-pattern>*/Database/Settings/*</exclude-pattern>
        <exclude-pattern>*/Database/Elastic/*</exclude-pattern>
    </rule>
    <rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
        <exclude-pattern>*/Tests/*</exclude-pattern>
    </rule>
    <rule ref="Generic.ControlStructures.InlineControlStructure">
        <properties>
            <property name="error" value="true"/>
        </properties>
    </rule>

    <rule ref="SlevomatCodingStandard.Classes.MethodSpacing">
        <properties>
            <property name="minLinesCount" type="integer" value="1"/>
            <property name="maxLinesCount" type="integer" value="1"/>
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
    <rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration"/>
    <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
    <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
    <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
    <rule ref="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators"/>
    <rule ref="SlevomatCodingStandard.Operators.RequireOnlyStandaloneIncrementAndDecrementOperators"/>
    <rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
    <rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
    <rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
    <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
    <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
    <rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
    <rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
    <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
        <properties>
            <property name="searchAnnotations" type="bool" value="true"/>
        </properties>
    </rule>

    <rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
    <rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement"/>
    <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
    <rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
    <rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration">
        <properties>
            <property name="spacesCountAfterKeyword" type="integer" value="1"/>
        </properties>
    </rule>
    <rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction"/>
    <rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction"/>
    <rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile"/>
    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
    <rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
    <rule ref="SlevomatCodingStandard.PHP.ShortList"/>
    <rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
    <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations"/>
    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments"/>
    <rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment"/>
    <rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
    <rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/>
    <rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/>

</ruleset>