| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class BaseLineResultsBuilder |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | * |
||
| 15 | * @psalm-var array<mixed> |
||
| 16 | */ |
||
| 17 | private $results; |
||
| 18 | |||
| 19 | public function __construct() |
||
| 20 | { |
||
| 21 | $this->results = []; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function add(string $fileName, int $lineNumber, string $type, Severity $severity): self |
||
| 25 | { |
||
| 26 | $this->results[] = [ |
||
| 27 | 'fileName' => $fileName, |
||
| 28 | 'lineNumber' => $lineNumber, |
||
| 29 | 'type' => $type, |
||
| 30 | 'message' => 'Message', |
||
| 31 | 'severity' => $severity->getSeverity(), |
||
| 32 | ]; |
||
| 33 | |||
| 34 | return $this; |
||
| 35 | } |
||
| 36 | |||
| 37 | public function build(): BaseLineAnalysisResults |
||
| 40 | } |
||
| 41 | } |
||
| 42 |