Repository navigation
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
115 lines (115 loc) · 6.98 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
115 lines (115 loc) · 6.98 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
parameters:
level: max
paths:
- src
- tests
tmpDir: reports/phpstan
ignoreErrors:
# PSR-3 LoggerInterface::log() types $level as mixed; the library casts it to string at that
# boundary to resolve the log level. The mixed origin is the PSR contract, not the library.
- identifier: cast.string
path: src/LogLevel.php
# Internal collaborators and private factory constructors carry plain array shapes. Native PHP
# cannot annotate the value type, and PHPDoc is prohibited on Internal types and constructors.
- identifier: missingType.iterableValue
path: src/Internal/LogFormatter.php
- identifier: missingType.iterableValue
path: src/Internal/EncodedPayload.php
- identifier: missingType.iterableValue
path: src/Internal/LogEntryRecorder.php
- identifier: missingType.iterableValue
path: src/Internal/Redactor/*.php
- identifier: missingType.iterableValue
path: src/LogEntry.php
- identifier: missingType.iterableValue
path: src/Redactions/*.php
# The builders describe the redactions as a plain list of Redaction, and the loggers hand that
# list to the typed collection when they build. PHPDoc is prohibited on constructors, and the
# element type cannot be written on a promoted property, so it is lost at both crossings.
- identifier: missingType.iterableValue
path: src/StreamLoggerBuilder.php
- identifier: argument.type
path: src/StreamLogger.php
- identifier: argument.type
path: src/TelemetryLogger.php
# The redactors traverse plain arrays into the array<string, mixed> contract of
# Redaction::redact, and the field matcher reads plain string patterns out of an untyped
# configuration array; the values originate as mixed log context, an irreducible boundary
# shape inside Internal collaborators.
- identifier: argument.type
path: src/Internal/Redactor/*.php
# The recorder accumulates entries in a plain array before handing them to the typed
# collection, and the untyped field lists of the redaction constructors reach the typed
# signatures of the primitives they delegate to. Both cross the same no-PHPDoc boundary.
- identifier: argument.type
path: src/Internal/LogEntryRecorder.php
- identifier: argument.type
path: src/Redactions/*.php
# The field matcher reads its field names out of the same untyped configuration array and casts
# each one to string before comparing, so the language cannot prove the type at that point.
- identifier: cast.string
path: src/Internal/Redactor/FieldMatcher.php
# LogStream wraps a stream resource the language can only promote as mixed; fwrite then
# receives that mixed handle. Internal collaborator with intrinsic resource state.
- identifier: argument.type
path: src/Internal/Stream/LogStream.php
# The metric carries its dimensions and fields as plain arrays, and the Internal collaborators
# that render them read those shapes back. PHPDoc is prohibited on constructors and on Internal
# types, and neither shape is generic, so the value type cannot be written anywhere.
- identifier: missingType.iterableValue
path: src/Metrics/Metric.php
- identifier: missingType.iterableValue
path: src/Internal/Metrics/*.php
# UnboundedDimensions holds the refused names in a promoted array and looks each one up among
# the dimension keys. The names reach it as strings through a variadic, but the element type is
# lost on the promoted parameter, which is the same boundary the metric line crosses.
- identifier: argument.type
path: src/Internal/Metrics/*.php
# UnboundedDimensions hands back one of the names it holds, which reached it as a string through a
# variadic. The promoted array lost the element type, and a cast to restore it would be a line no
# test can kill, since every name in there is already a string.
- identifier: return.type
path: src/Internal/Metrics/*.php
# MetricLine reads the Field values back out of the plain array the metric keeps them in, and
# feeds them to the redactions and back. The element type is gone on both crossings.
- identifier: property.nonObject
path: src/Internal/Metrics/*.php
# EmbeddedMetricFormat::format() hands back what the envelope built. MetricFormat declares the
# payload shape and the interface docblock is where it belongs; the value type is lost crossing
# the Internal collaborator, which cannot carry PHPDoc to restore it.
- identifier: return.type
path: src/Metrics/CloudWatch/*.php
# The metric data providers return rows of arguments and the record fixture navigates a payload
# whose nested shape the language cannot see. PHPDoc is prohibited anywhere inside tests/.
- identifier: missingType.iterableValue
path: tests/Unit/EmbeddedMetricFormatTest.php
- identifier: missingType.iterableValue
path: tests/Unit/MetricTest.php
# The test reads a Dimension and a Field back out of the plain arrays the metric keeps them in,
# so the element type is gone by the time the assertion reaches the value object.
- identifier: property.nonObject
path: tests/Unit/MetricTest.php
- identifier: missingType.iterableValue
path: tests/Models/EmbeddedMetricPayload.php
- identifier: offsetAccess.nonOffsetAccessible
path: tests/Models/EmbeddedMetricPayload.php
# json_decode() returns mixed, so the deep recursive redaction test and the metric line tests
# array-access a mixed value when reading the decoded payload. Descriptive PHPDoc is prohibited
# in tests/, so the irreducible mixed-origin offset access is suppressed for those files.
- identifier: offsetAccess.nonOffsetAccessible
path: tests/Unit/StreamLoggerTest.php
- identifier: offsetAccess.nonOffsetAccessible
path: tests/Unit/TelemetryLoggerTest.php
# The mixed values read from that decoded payload feed string-typed PHPUnit assertion
# parameters (assertStringStartsWith, assertStringContainsString, ...). Same mixed origin.
- identifier: argument.type
path: tests/Unit/StreamLoggerTest.php
- identifier: argument.type
path: tests/Unit/TelemetryLoggerTest.php
# The data providers return lists of argument rows. Their iterable value type cannot be
# expressed without PHPDoc, which tests/ forbids, so it is suppressed for those files.
- identifier: missingType.iterableValue
path: tests/Unit/LogLevelTest.php
- identifier: missingType.iterableValue
path: tests/Unit/StreamLoggerTest.php
reportUnmatchedIgnoredErrors: true