| Total Complexity | 6 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class FileMutations |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var FileMutation[] |
||
| 24 | */ |
||
| 25 | private $fileMutations; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * FileMutations constructor. |
||
| 29 | * |
||
| 30 | * @param FileMutation[] $fileMutations |
||
| 31 | */ |
||
| 32 | public function __construct(array $fileMutations) |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Returns FileMutations for the given file name. Or null if there are no file mutations for that file in the diff. |
||
| 42 | */ |
||
| 43 | public function getFileMutation(NewFileName $newFileName): ?FileMutation |
||
| 44 | { |
||
| 45 | $newFileNameAsString = $newFileName->getFileName(); |
||
| 46 | |||
| 47 | return $this->fileMutations[$newFileNameAsString] ?? null; |
||
| 48 | } |
||
| 49 | |||
| 50 | private function addFileMutation(FileMutation $fileMutation): void |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Returns number of FileMutations (only usecase is for testing). |
||
| 64 | */ |
||
| 65 | public function getCount(): int |
||
| 68 | } |
||
| 69 | } |
||
| 70 |