-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathphpstan-baseline.php
More file actions
209 lines (207 loc) · 11.2 KB
/
phpstan-baseline.php
File metadata and controls
209 lines (207 loc) · 11.2 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?php declare(strict_types = 1);
$ignoreErrors = [];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Helpers\\\\ConversationSerializer\\:\\:deserialize\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ConversationSerializer.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Helpers\\\\ConversationSerializer\\:\\:serialize\\(\\) return type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ConversationSerializer.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Helpers\\\\ConversationSerializer\\:\\:serializeFromOrchestrator\\(\\) return type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ConversationSerializer.php',
];
$ignoreErrors[] = [
'message' => '#^If condition is always true\\.$#',
'identifier' => 'if.alwaysTrue',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ToolHelper.php',
];
$ignoreErrors[] = [
'message' => '#^Left side of && is always true\\.$#',
'identifier' => 'booleanAnd.leftAlwaysTrue',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ToolHelper.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Helpers\\\\ToolHelper\\:\\:toolToDefinition\\(\\) return type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ToolHelper.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/src/Helpers/ToolHelper.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$properties of static method Swis\\\\Agents\\\\Helpers\\\\ToolHelper\\:\\:processObjectProperties\\(\\) expects array\\<array\\<string, mixed\\>\\>, array\\<string, string\\> given\\.$#',
'identifier' => 'argument.type',
'count' => 2,
'path' => __DIR__ . '/src/Helpers/ToolHelper.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter &\\$properties by\\-ref type of method Swis\\\\Agents\\\\Helpers\\\\ToolHelper\\:\\:processObjectProperties\\(\\) expects array\\<array\\<string, mixed\\>\\>, array\\<array\\<mixed\\>\\> given\\.$#',
'identifier' => 'parameterByRef.type',
'count' => 2,
'path' => __DIR__ . '/src/Helpers/ToolHelper.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Interfaces\\\\TracingProcessorInterface\\:\\:start\\(\\) has parameter \\$metaData with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Interfaces/TracingProcessorInterface.php',
];
$ignoreErrors[] = [
'message' => '#^Call to function assert\\(\\) with false will always evaluate to false\\.$#',
'identifier' => 'function.impossibleType',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Call to function assert\\(\\) with true will always evaluate to true\\.$#',
'identifier' => 'function.alreadyNarrowedType',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Call to function is_array\\(\\) with string will always evaluate to false\\.$#',
'identifier' => 'function.impossibleType',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Offset \'description\' on \\*NEVER\\* on left side of \\?\\? always exists and is not nullable\\.$#',
'identifier' => 'nullCoalesce.offset',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Offset \'enum\' on \\*NEVER\\* on left side of \\?\\? always exists and is not nullable\\.$#',
'identifier' => 'nullCoalesce.offset',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Offset \'properties\' on array\\{properties\\: array\\{type\\: string, 0\\: mixed\\}, required\\: array\\<string\\>, type\\: string\\} in isset\\(\\) always exists and is not nullable\\.$#',
'identifier' => 'isset.offset',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Offset \'required\' on array\\{properties\\: array\\{type\\: string, 0\\: mixed\\}, required\\: array\\<string\\>, type\\: string\\} in isset\\(\\) always exists and is not nullable\\.$#',
'identifier' => 'isset.offset',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Offset \'type\' on \\*NEVER\\* on left side of \\?\\? always exists and is not nullable\\.$#',
'identifier' => 'nullCoalesce.offset',
'count' => 1,
'path' => __DIR__ . '/src/Mcp/McpTool.php',
];
$ignoreErrors[] = [
'message' => '#^Property Swis\\\\Agents\\\\Model\\\\ModelSettings\\:\\:\\$modelName \\(string\\) does not accept mixed\\.$#',
'identifier' => 'assign.propertyType',
'count' => 1,
'path' => __DIR__ . '/src/Model/ModelSettings.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Orchestrator\\:\\:withContextFromData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Orchestrator.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\$apiKey of static method OpenAI\\:\\:client\\(\\) expects string, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/src/Orchestrator/RunContext.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\$organization of static method OpenAI\\:\\:client\\(\\) expects string\\|null, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/src/Orchestrator/RunContext.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\$project of static method OpenAI\\:\\:client\\(\\) expects string\\|null, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/src/Orchestrator/RunContext.php',
];
$ignoreErrors[] = [
'message' => '#^Instanceof between OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\CodeInterpreterCall\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\CodeInterpreterCodeDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\CodeInterpreterCodeDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ContentPart\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\Error\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\FileSearchCall\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\FunctionCallArgumentsDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\FunctionCallArgumentsDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ImageGenerationPart\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ImageGenerationPartialImage\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\McpCall\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\McpCallArgumentsDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\McpCallArgumentsDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\McpListTools\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\McpListToolsInProgress\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\OutputItem\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\OutputTextAnnotationAdded\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\OutputTextDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\OutputTextDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ReasoningSummaryPart\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ReasoningSummaryTextDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ReasoningSummaryTextDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ReasoningTextDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\ReasoningTextDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\RefusalDelta\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\RefusalDone\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\Response\\|OpenAI\\\\Responses\\\\Responses\\\\Streaming\\\\WebSearchCall and OpenAI\\\\Responses\\\\Responses\\\\CreateResponse will always evaluate to false\\.$#',
'identifier' => 'instanceof.alwaysFalse',
'count' => 1,
'path' => __DIR__ . '/src/Response/ResponsesStreamedResponseWrapper.php',
];
$ignoreErrors[] = [
'message' => '#^Result of && is always false\\.$#',
'identifier' => 'booleanAnd.alwaysFalse',
'count' => 1,
'path' => __DIR__ . '/src/Response/ResponsesStreamedResponseWrapper.php',
];
$ignoreErrors[] = [
'message' => '#^Property Swis\\\\Agents\\\\Response\\\\StreamedResponseWrapper\\:\\:\\$capturedToolCalls type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Response/StreamedResponseWrapper.php',
];
$ignoreErrors[] = [
'message' => '#^Property Swis\\\\Agents\\\\Response\\\\StreamedResponseWrapper\\:\\:\\$generated type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Response/StreamedResponseWrapper.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Tracing\\\\OpenAIExporter\\:\\:buildBody\\(\\) has parameter \\$items with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Tracing/OpenAIExporter.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Tracing\\\\Processor\\:\\:start\\(\\) has parameter \\$metaData with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Tracing/Processor.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTime\\|false\\.$#',
'identifier' => 'method.nonObject',
'count' => 2,
'path' => __DIR__ . '/src/Tracing/Span.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Tracing\\\\Span\\:\\:__construct\\(\\) has parameter \\$spanData with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Tracing/Span.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Tracing\\\\Span\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Tracing/Span.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Tracing\\\\Trace\\:\\:__construct\\(\\) has parameter \\$metaData with no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Tracing/Trace.php',
];
$ignoreErrors[] = [
'message' => '#^Method Swis\\\\Agents\\\\Tracing\\\\Trace\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#',
'identifier' => 'missingType.iterableValue',
'count' => 1,
'path' => __DIR__ . '/src/Tracing/Trace.php',
];
return ['parameters' => ['ignoreErrors' => $ignoreErrors]];