summaryrefslogtreecommitdiffstats
path: root/phpstan.neon
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:46:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:46:43 +0000
commit3e02d5aff85babc3ffbfcf52313f2108e313aa23 (patch)
treeb01f3923360c20a6a504aff42d45670c58af3ec5 /phpstan.neon
parentInitial commit. (diff)
downloadicingaweb2-3e02d5aff85babc3ffbfcf52313f2108e313aa23.tar.xz
icingaweb2-3e02d5aff85babc3ffbfcf52313f2108e313aa23.zip
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'phpstan.neon')
-rw-r--r--phpstan.neon67
1 files changed, 67 insertions, 0 deletions
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..9da27bc
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,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