-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathphpstan.neon
More file actions
34 lines (33 loc) · 1.38 KB
/
Copy pathphpstan.neon
File metadata and controls
34 lines (33 loc) · 1.38 KB
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
includes:
- ../../vendor/glpi-project/phpstan-glpi/extension.neon
- phpstan-baseline.neon
parameters:
level: 5
paths:
- ajax
- front
- src
- hook.php
- setup.php
scanDirectories:
- ../../inc
- ../../src
scanFiles:
# Local stub for the optional datainjection plugin (see the stub header).
# Keeps analysis independent of where datainjection lives, or if absent.
- tools/phpstan-stubs/datainjection.php
bootstrapFiles:
- ../../stubs/glpi_constants.php
- ../../vendor/autoload.php
- setup.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
# GLPI_INSTALL_MODE is a compile-time constant whose value depends on how
# GLPI was installed: 'GIT' on a git checkout (local dev), 'TARBALL' on
# the CI runner, 'CLOUD' in GLPI cloud. The `=== 'CLOUD'` guards are an
# intentional runtime branch (ping disabled in cloud). PHPStan constant-
# folds the comparison to always-false and bakes the LOCAL value into the
# message, so a baseline generated on a git checkout ('GIT') never matches
# the runner ('TARBALL'). Ignore generically on the left-hand value so the
# rule is stable across every install mode.
- '#^Strict comparison using \=\=\= between ''[A-Z]+'' and ''CLOUD'' will always evaluate to false\.$#'