File: phpstan.neon

package info (click to toggle)
phpunit 12.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 50,160 kB
  • sloc: php: 101,772; xml: 2,084; makefile: 124; sh: 99
file content (67 lines) | stat: -rw-r--r-- 2,324 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
parameters:
    level: 6

    paths:
        - src

    excludePaths:
        # exclude partial traits, which are only used in runtime generated code
        - src/Framework/MockObject/Runtime/Api

    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:
                - PHPUnit\Framework\Constraint\Count
                - PHPUnit\Framework\AssertionFailedError
                - PHPUnit\Framework\Exception
                - PHPUnit\Framework\TestSuite
        privateInFinalClass:
            enabled: true

    type_coverage:
        declare: 100
        return: 100
        param: 100
        property: 100
        constant: 100

    ignoreErrors:
        # ignore errors caused by defensive programming
        - '#Call to function assert\(\) with true will always evaluate to true.#'
        - '#Instanceof between .* and .* will always evaluate to true.#'
        - '#Strict comparison using !== between .*non-empty-string.* and .* will always evaluate to true.#'
        - '#Strict comparison using !== between .*non-falsy-string.* and .* will always evaluate to true.#'
        - '#Call to an undefined method ReflectionProperty::.*#'
        - '#Access to constant .* on an unknown class PropertyHookType.#'
        - identifier: argument.named

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