-
-
Notifications
You must be signed in to change notification settings - Fork 440
Expand file tree
/
Copy pathFileProcessResult.php
More file actions
41 lines (34 loc) · 817 Bytes
/
FileProcessResult.php
File metadata and controls
41 lines (34 loc) · 817 Bytes
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
<?php
declare(strict_types=1);
namespace Rector\ValueObject;
use Rector\ValueObject\Error\SystemError;
use Rector\ValueObject\Reporting\FileDiff;
use Webmozart\Assert\Assert;
final readonly class FileProcessResult
{
/**
* @param SystemError[] $systemErrors
*/
public function __construct(
private array $systemErrors,
private ?FileDiff $fileDiff,
private bool $hasChanged
) {
Assert::allIsInstanceOf($systemErrors, SystemError::class);
}
/**
* @return SystemError[]
*/
public function getSystemErrors(): array
{
return $this->systemErrors;
}
public function getFileDiff(): ?FileDiff
{
return $this->fileDiff;
}
public function hasChanged(): bool
{
return $this->hasChanged;
}
}