Lines
100.00%
3 / 3
Functions and Methods
100.00%
3 / 3
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| CheckResult | 100.00% | 3 / 3 | 100.00% | 3 / 3 | 3 | 100.00% | 1 / 1 | |||
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| listStaleFiles | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| isClean | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Codegen\Output; | |
| 6 | ||
| 7 | use Stewart\Codegen\Model\GenerationWarning; | |
| 8 | use Stewart\Codegen\Output\Collection\FileChangeCollection; | |
| 9 | ||
| 10 | final readonly class CheckResult | |
| 11 | { | |
| 12 | /** @param list<GenerationWarning> $warnings */ | |
| 13 | public function __construct( | |
| 14 | public FileChangeCollection $changes, | |
| 15 | public array $warnings, | |
| 16 | ) {} | |
| 17 | ||
| 18 | public function listStaleFiles(): FileChangeCollection | |
| 19 | { | |
| 20 | return $this->changes->filterStale(); | |
| 21 | } | |
| 22 | ||
| 23 | public function isClean(): bool | |
| 24 | { | |
| 25 | return $this->changes->isClean(); | |
| 26 | } | |
| 27 | } |