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