| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function checkout(CheckedOutRepository $sourceRepository, Revision $revision) : CheckedOutRepository |
||
| 15 | { |
||
| 16 | $checkoutDirectory = sys_get_temp_dir() . '/api-compare-' . (string)$revision; |
||
| 17 | |||
| 18 | (new Process(['git', 'clone', (string)$sourceRepository, $checkoutDirectory]))->mustRun(); |
||
| 19 | (new Process(['git', 'checkout', (string)$revision]))->setWorkingDirectory($checkoutDirectory)->mustRun(); |
||
| 20 | |||
| 21 | return CheckedOutRepository::fromPath($checkoutDirectory); |
||
| 22 | } |
||
| 33 |