parameters:
    level: 10

    paths:
        - src
        - tests/tests
        - tests/bootstrap.php

    resultCachePath: %tmpDir%/php-code-coverage-14.3.php

    stubFiles:
        - build/phpstan-stubs/extensions.stub

    checkTooWideReturnTypesInProtectedAndPublicMethods: true
    reportAlwaysTrueInLastCondition: true
    reportPossiblyNonexistentConstantArrayOffset: true
    reportPossiblyNonexistentGeneralArrayOffset: true
    treatPhpDocTypesAsCertain: false

    strictRules:
        allRules: false
        booleansInConditions: true
        closureUsesThis: true
        disallowedBacktick: true
        disallowedEmpty: true
        disallowedImplicitArrayCreation: true
        disallowedLooseComparison: true
        disallowedShortTernary: true
        illegalConstructorMethodCall: true
        matchingInheritedMethodNames: true
        noVariableVariables: true
        numericOperandsInArithmeticOperators: true
        overwriteVariablesWithLoop: true
        requireParentConstructorCall: true
        strictArrayFilter: true
        strictFunctionCalls: true
        switchConditionsMatchingType: true
        uselessCast: true

    ergebnis:
        allRules: false
        final:
            enabled: true
            classesNotRequiredToBeAbstractOrFinal:
                - SebastianBergmann\CodeCoverage\Report\Xml\File

    ignoreErrors:
        # Ignore errors caused by defensive programming
        - '#Call to function assert\(\) with true will always evaluate to true.#'
        - '#Call to method .* will always evaluate to true.#'
        - '#Instanceof between .* and .* will always evaluate to true.#'
        - '#SebastianBergmann\\CodeCoverage\\Node\\Iterator::current\(\) should be covariant with return type#'

includes:
	- phar://phpstan.phar/conf/bleedingEdge.neon
