<commit_before><?xml version="1.0"?>
<ruleset name="Doctrine">
    <description>The Doctrine coding standard.</description>

    <!-- Import PSR-2 coding standard (base) -->
    <rule ref="PSR2"/>

    <!-- Forbid `array(...)` -->
    <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
    <!-- Forbid duplicate classes -->
    <rule ref="Generic.Classes.DuplicateClassName"/>
    <!-- Forbid empty statements -->
    <rule ref="Generic.CodeAnalysis.EmptyStatement">
        <!-- But allow empty catch -->
        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH"/>
    </rule>
    <!-- Forbid final methods in final classes -->
    <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
    <!-- Forbid useless empty method overrides -->
    <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
    <!-- Forbid inline HTML in PHP code -->
    <rule ref="Generic.Files.InlineHTML"/>
    <!-- Align corresponding assignment statement tokens -->
    <rule ref="Generic.Formatting.MultipleStatementAlignment">
        <properties>
            <property name="error" value="true"/>
        </properties>
    </rule>
    <!-- Force whitespace after a type cast -->
    <rule ref="Generic.Formatting.SpaceAfterCast"/>
    <!-- Force whitespace after `!` -->
    <rule ref="Generic.Formatting.SpaceAfterNot"/>
    <!-- Forbid PHP 4 constructors -->
    <rule ref="Generic.NamingConventions.ConstructorName"/>
    <!-- Forbid any content before opening tag -->
    <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
    <!-- Forbid deprecated functions -->
    <rule ref="Generic.PHP.DeprecatedFunctions"/>
    <!-- Forbid alias functions, i.e. `sizeof()`, `delete()` -->
    <rule ref="Generic.PHP.ForbiddenFunctions"/>
    <!-- Forbid useless inline string concatenation -->
    <rule ref="Generic.Strings.UnnecessaryStringConcat">
        <!-- But multiline is useful for readability -->
        <properties>
            <property name="allowMultiline" value="true"/>
        </properties>
    </rule>
    <!-- Forbid backtick operator -->
    <rule ref="Generic.PHP.BacktickOperator"/>
    <!-- Forbid short open tag -->
    <rule ref="Generic.PHP.DisallowShortOpenTag"/>
    <!-- Forbid `php_sapi_name()` function -->
    <rule ref="Generic.PHP.SAPIUsage"/>
    <!-- Forbid comments starting with # -->
    <rule ref="PEAR.Commenting.InlineComment"/>
    <!-- Disallow else if in favour elseif -->
    <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
        <type>error</type>
    </rule>
    <!-- Require comma after last element in multi-line array -->
    <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
    <!-- Require presence of constant visibility -->
    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
    <!-- Forbid dead code -->
    <rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements"/>
    <!-- Forbid useless annotations - Git and LICENCE file provide more accurate information -->
    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
        <properties>
            <property
                name="forbiddenAnnotations"
                type="array"
                value="
                    @author,
                    @copyright,
                    @created,
                    @license,
                    @package,
                    @since,
                    @version
                "
            />
        </properties>
    </rule>
    <!-- report invalid format of inline phpDocs with @var -->
    <rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
    <!-- Forbid assignments in conditions -->
    <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
    <!-- Forbid fancy yoda conditions -->
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
    <!-- Forbid weak comparisons -->
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>
    <!-- Require language constructs without parentheses -->
    <rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
    <!-- Forbid useless unreachable catch blocks -->
    <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
    <!-- Require using Throwable instead of Exception -->
    <rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly"/>
    <!-- Require use statements to be alphabetically sorted -->
    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
    <!-- Forbid fancy group uses -->
    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
    <!-- Forbid multiple use statements on same line -->
    <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
    <!-- Forbid using absolute class name references (except global ones) -->
    <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
        <properties>
            <property name="allowFullyQualifiedGlobalClasses" type="boolean" value="true"/>
            <property name="allowFullyQualifiedGlobalFunctions" type="boolean" value="true"/>
            <property name="allowFullyQualifiedGlobalConstants" type="boolean" value="true"/>
            <property name="allowFullyQualifiedNameForCollidingClasses" type="boolean" value="true"/>
        </properties>
    </rule>
    <!-- Forbid unused use statements -->
    <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
        <properties>
            <property name="searchAnnotations" type="boolean" value="true"/>
        </properties>
    </rule>
    <!-- Forbid superfluous leading backslash in use statements -->
    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
    <!-- Forbid useless uses of the same namespace -->
    <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
    <!-- Require presence of declare(strict_types=1) -->
    <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
        <properties>
            <property
                name="newlinesCountBetweenOpenTagAndDeclare"
                value="2"
            />
            <property
                name="spacesCountAroundEqualsSign"
                value="0"
            />
        </properties>
    </rule>
    <!-- Require use of short versions of scalar types (i.e. int instead of integer) -->
    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
    <!-- Require ? when default value is null -->
    <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
    <!-- Require one space between typehint and variable, require no space between nullability sign and typehint -->
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/><commit_msg>Check for two newlines after declare, enable ClassConstantVisibility fixer<commit_after><?xml version="1.0"?>
<ruleset name="Doctrine">
    <description>The Doctrine coding standard.</description>

    <!-- Import PSR-2 coding standard (base) -->
    <rule ref="PSR2"/>

    <!-- Forbid `array(...)` -->
    <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
    <!-- Forbid duplicate classes -->
    <rule ref="Generic.Classes.DuplicateClassName"/>
    <!-- Forbid empty statements -->
    <rule ref="Generic.CodeAnalysis.EmptyStatement">
        <!-- But allow empty catch -->
        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH"/>
    </rule>
    <!-- Forbid final methods in final classes -->
    <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
    <!-- Forbid useless empty method overrides -->
    <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
    <!-- Forbid inline HTML in PHP code -->
    <rule ref="Generic.Files.InlineHTML"/>
    <!-- Align corresponding assignment statement tokens -->
    <rule ref="Generic.Formatting.MultipleStatementAlignment">
        <properties>
            <property name="error" value="true"/>
        </properties>
    </rule>
    <!-- Force whitespace after a type cast -->
    <rule ref="Generic.Formatting.SpaceAfterCast"/>
    <!-- Force whitespace after `!` -->
    <rule ref="Generic.Formatting.SpaceAfterNot"/>
    <!-- Forbid PHP 4 constructors -->
    <rule ref="Generic.NamingConventions.ConstructorName"/>
    <!-- Forbid any content before opening tag -->
    <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
    <!-- Forbid deprecated functions -->
    <rule ref="Generic.PHP.DeprecatedFunctions"/>
    <!-- Forbid alias functions, i.e. `sizeof()`, `delete()` -->
    <rule ref="Generic.PHP.ForbiddenFunctions"/>
    <!-- Forbid useless inline string concatenation -->
    <rule ref="Generic.Strings.UnnecessaryStringConcat">
        <!-- But multiline is useful for readability -->
        <properties>
            <property name="allowMultiline" value="true"/>
        </properties>
    </rule>
    <!-- Forbid backtick operator -->
    <rule ref="Generic.PHP.BacktickOperator"/>
    <!-- Forbid short open tag -->
    <rule ref="Generic.PHP.DisallowShortOpenTag"/>
    <!-- Forbid `php_sapi_name()` function -->
    <rule ref="Generic.PHP.SAPIUsage"/>
    <!-- Forbid comments starting with # -->
    <rule ref="PEAR.Commenting.InlineComment"/>
    <!-- Disallow else if in favour elseif -->
    <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
        <type>error</type>
    </rule>
    <!-- Require comma after last element in multi-line array -->
    <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
    <!-- Require presence of constant visibility -->
    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility">
        <properties>
            <property name="fixable" type="boolean" value="true"/>
        </properties>
    </rule>
    <!-- Forbid dead code -->
    <rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements"/>
    <!-- Forbid useless annotations - Git and LICENCE file provide more accurate information -->
    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
        <properties>
            <property
                name="forbiddenAnnotations"
                type="array"
                value="
                    @author,
                    @copyright,
                    @created,
                    @license,
                    @package,
                    @since,
                    @version
                "
            />
        </properties>
    </rule>
    <!-- report invalid format of inline phpDocs with @var -->
    <rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
    <!-- Forbid assignments in conditions -->
    <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
    <!-- Forbid fancy yoda conditions -->
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
    <!-- Forbid weak comparisons -->
    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/>
    <!-- Require language constructs without parentheses -->
    <rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
    <!-- Forbid useless unreachable catch blocks -->
    <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
    <!-- Require using Throwable instead of Exception -->
    <rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly"/>
    <!-- Require use statements to be alphabetically sorted -->
    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
    <!-- Forbid fancy group uses -->
    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
    <!-- Forbid multiple use statements on same line -->
    <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
    <!-- Forbid using absolute class name references (except global ones) -->
    <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
        <properties>
            <property name="allowFullyQualifiedGlobalClasses" type="boolean" value="true"/>
            <property name="allowFullyQualifiedGlobalFunctions" type="boolean" value="true"/>
            <property name="allowFullyQualifiedGlobalConstants" type="boolean" value="true"/>
            <property name="allowFullyQualifiedNameForCollidingClasses" type="boolean" value="true"/>
        </properties>
    </rule>
    <!-- Forbid unused use statements -->
    <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
        <properties>
            <property name="searchAnnotations" type="boolean" value="true"/>
        </properties>
    </rule>
    <!-- Forbid superfluous leading backslash in use statements -->
    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
    <!-- Forbid useless uses of the same namespace -->
    <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
    <!-- Require presence of declare(strict_types=1) -->
    <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
        <properties>
            <property
                name="newlinesCountBetweenOpenTagAndDeclare"
                value="2"
            />
            <property
                name="spacesCountAroundEqualsSign"
                value="0"
            />
            <property
                name="newlinesCountAfterDeclare"
                value="2"
            />
        </properties>
    </rule>
    <!-- Require use of short versions of scalar types (i.e. int instead of integer) -->
    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
    <!-- Require ? when default value is null -->
    <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
    <!-- Require one space between typehint and variable, require no space between nullability sign and typehint -->
    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
{'fraction_non_alphanumeric': 0.1305383172174917, 'fraction_numerical': 0.0013710492134507144, 'mean_word_length': 2.8231724137931034, 'pattern_counts': {'":': 0, '<': 254, '<?xml version=': 2, '>': 254, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '738224', 'n_tokens_mistral': 3648, 'n_tokens_neox': 3529, 'n_words': 819}