summaryrefslogtreecommitdiffstats
path: root/phpstan.neon
blob: 9da27bcff97bd41bdfcd1f65d3775211ff3c97df (plain)
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
includes:
	- phpstan-baseline.neon

parameters:
    level: max

    checkFunctionNameCase: true
    checkInternalClassCaseSensitivity: true
    treatPhpDocTypesAsCertain: false

    paths:
        - application
        - library/Icinga
        - modules/doc/application
        - modules/migrate/application
        - modules/monitoring/application
        - modules/setup/application
        - modules/test/application
        - modules/translation/application
        - modules/doc/library
        - modules/migrate/library
        - modules/monitoring/library
        - modules/setup/library
        - modules/translation/library

    ignoreErrors:
        - '#Unsafe usage of new static\(\)#'
        - '#. but return statement is missing#'
        - '#Cannot call method importNode\(\) on DOMDocument\|null.#'

        # ldap_connect() returns `LDAP\Connection` in php >= 81
        -
            message: '#Parameter .* of function .* expects .*, .* given#'
            count: 7
            path: library/Icinga/Protocol/Ldap/LdapCapabilities.php

        -
            message: '#Parameter .* of (function|callable) .* expects .*, .* given#'
            count: 75
            path: library/Icinga/Protocol/Ldap/LdapConnection.php

        -
            message: '#Method Icinga\\Protocol\\Ldap\\LdapConnection::(prepareNewConnection|ldapSearch)\(\) should return (resource|bool\|resource) but returns (LDAP\\Connection\|false|array\|LDAP\\Result\|false)#'
            count: 3
            path: library/Icinga/Protocol/Ldap/LdapConnection.php

        -
            message: "#Cannot access offset ('count'|'dn') on array.*#"
            count: 2
            path: library/Icinga/Protocol/Ldap/LdapConnection.php

        - '#Call to an undefined method ipl\\Sql\\Connection::exec\(\)#'

    scanDirectories:
        - vendor

    excludePaths:
        - library/Icinga/Test

    universalObjectCratesClasses:
        - ipl\Orm\Model
        - Icinga\Data\ConfigObject
        - Icinga\Web\View
        - Icinga\Module\Monitoring\Object\MonitoredObject
        - Icinga\Module\Monitoring\DataView\DataView
        - Icinga\Web\Session\SessionNamespace
        - Icinga\User\Preferences