1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Fixable;
4:
5: use PHPStan\Analyser\Error;
6:
7: /**
8: * @api
9: */
10: final class FixResult
11: {
12:
13: /**
14: * @param list<Error> $fixedErrors
15: * @param list<Error> $skippedErrors
16: * @param list<string> $changedFiles
17: */
18: public function __construct(
19: private array $fixedErrors,
20: private array $skippedErrors,
21: private array $changedFiles,
22: )
23: {
24: }
25:
26: /**
27: * Errors whose fixes were applied. Two errors with the same fix, like an error
28: * in a trait reported for each class using it, are both fixed by one change.
29: *
30: * @return list<Error>
31: */
32: public function getFixedErrors(): array
33: {
34: return $this->fixedErrors;
35: }
36:
37: /**
38: * Errors whose fixes overlap with the fix of another error or whose files changed since the analysis.
39: *
40: * @return list<Error>
41: */
42: public function getSkippedErrors(): array
43: {
44: return $this->skippedErrors;
45: }
46:
47: /**
48: * @return list<string>
49: */
50: public function getChangedFiles(): array
51: {
52: return $this->changedFiles;
53: }
54:
55: }
56: