-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
53 lines (49 loc) · 2.94 KB
/
Copy pathphpstan.neon
File metadata and controls
53 lines (49 loc) · 2.94 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Decidesk — Conduction PHPStan config.
#
# The shared base is the single source of truth. Everything here is either the
# app's own tracked debt or an ignore naming a symbol that exists in no other
# fleet app. Anything you are tempted to add that another app would also need
# belongs in the base, not here.
includes:
- vendor/conduction/hydra-gates/quality-config/phpstan-base.neon
# One tracked entry left, and it is a security question rather than lint —
# read the file's header before touching it. Not regenerated; entries are
# removed one at a time as the underlying code is fixed.
- phpstan-baseline.neon
parameters:
# App-specific only. The base already sets level, paths, bootstrapFiles,
# excludePaths, scanDirectories and every fleet-wide ignore.
excludePaths:
# These controllers extend OpenRegister AppHost base controllers that are only
# available at runtime (dynamic app loading). PHPStan cannot resolve the parent
# class during static analysis; the inheritance chain is guarded by runtime
# app-availability checks in Application::register().
- lib/Controller/DashboardController.php
- lib/Controller/HealthController.php
- lib/Controller/MetricsController.php
scanFiles:
# OpenRegister ships IMcpToolProvider at runtime only. "implements unknown
# interface" is a non-ignorable PHPStan error, so hand it the same stub the
# phpunit bootstrap uses instead of muting it — this analyses the contract
# for real rather than suppressing it.
- tests/Stubs/Mcp/IMcpToolProvider.php
ignoreErrors:
# NC Talk's room/conversation manager is an external app class not available during
# analysis; it is resolved dynamically at runtime and guarded with method_exists(),
# so phpstan infers stdClass and cannot see the real named-parameter signatures.
- '#Unknown parameter \$(objectType|objectId|type|name) in call to method stdClass::(getRoomForObject|createConversationFromObject)\(\)#'
# `LogTranslationAdapter::resolveOpenConnector()` probes
# OPENCONNECTOR_CANDIDATES with class_exists() before asking the
# container for them. OpenConnector is a SEPARATE app: its classes exist
# only when it is installed, so phpstan — which never sees them — is
# right that the call "will always evaluate to false" in ITS world and
# wrong about the runtime.
#
# The probe is the feature. Deleting it to satisfy the analyser would
# remove the only thing making the integration optional. Scoped to these
# two class names rather than the rule, so a genuinely impossible
# class_exists() elsewhere still fails.
-
identifier: function.impossibleType
message: '#Call to function class_exists\(\) with .*OpenConnector.* will always evaluate to false#'
path: lib/Service/LogTranslationAdapter.php