1010use PHPStan \Collectors \CollectedData ;
1111use PHPStan \Collectors \Registry as CollectorRegistry ;
1212use PHPStan \Dependency \DependencyResolver ;
13+ use PHPStan \Dependency \RootExportedNode ;
1314use PHPStan \Node \InClassNode ;
1415use PHPStan \Node \InTraitNode ;
1516use PHPStan \Parser \Parser ;
2021
2122/**
2223 * @phpstan-import-type CollectorData from CollectedData
24+ * @phpstan-import-type LinesToIgnore from FileAnalyserResult
2325 */
2426final class FileAnalyserCallback
2527{
@@ -30,23 +32,30 @@ final class FileAnalyserCallback
3032 /** @var CollectorData */
3133 private array $ fileCollectedData = [];
3234
35+ /** @var array<string> */
3336 private array $ fileDependencies = [];
3437
38+ /** @var array<string> */
3539 private array $ usedTraitFileDependencies = [];
3640
41+ /** @var list<RootExportedNode> */
3742 private array $ exportedNodes = [];
3843
44+ /** @var list<Error> */
3945 private array $ temporaryFileErrors = [];
4046
47+ /** @var LinesToIgnore */
4148 private array $ linesToIgnore ;
4249
50+ /** @var LinesToIgnore */
4351 private array $ unmatchedLineIgnores ;
4452
4553 /**
4654 * @param array<string, true> $analysedFiles
4755 * @param callable(Node $node, Scope $scope): void|null $outerNodeCallback
4856 * @param Node\Stmt[] $parserNodes
4957 * @param IgnoreErrorExtension[] $ignoreErrorExtensions
58+ * @param list<string> $processedFiles
5059 */
5160 public function __construct (
5261 private string $ file ,
@@ -242,41 +251,65 @@ public function getFileErrors(): array
242251 return $ this ->fileErrors ;
243252 }
244253
254+ /**
255+ * @return CollectorData
256+ */
245257 public function getFileCollectedData (): array
246258 {
247259 return $ this ->fileCollectedData ;
248260 }
249261
262+ /**
263+ * @return array<string>
264+ */
250265 public function getFileDependencies (): array
251266 {
252267 return $ this ->fileDependencies ;
253268 }
254269
270+ /**
271+ * @return array<string>
272+ */
255273 public function getUsedTraitFileDependencies (): array
256274 {
257275 return $ this ->usedTraitFileDependencies ;
258276 }
259277
278+ /**
279+ * @return list<RootExportedNode>
280+ */
260281 public function getExportedNodes (): array
261282 {
262283 return $ this ->exportedNodes ;
263284 }
264285
286+ /**
287+ * @return LinesToIgnore
288+ */
265289 public function getLinesToIgnore (): array
266290 {
267291 return $ this ->linesToIgnore ;
268292 }
269293
294+ /**
295+ * @return LinesToIgnore
296+ */
270297 public function getUnmatchedLineIgnores (): array
271298 {
272299 return $ this ->unmatchedLineIgnores ;
273300 }
274301
302+ /**
303+ * @return list<Error>
304+ */
275305 public function getTemporaryFileErrors (): array
276306 {
277307 return $ this ->temporaryFileErrors ;
278308 }
279309
310+ /**
311+ * @return list<string>
312+ */
280313 public function getProcessedFiles (): array
281314 {
282315 return $ this ->processedFiles ;
0 commit comments