| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | class ChangedFiles extends Base |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $from; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private $to; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $from |
||
| 38 | 3 | * @return \SebastianFeldmann\Git\Command\DiffTree\ChangedFiles |
|
| 39 | */ |
||
| 40 | 3 | public function fromRevision(string $from): ChangedFiles |
|
| 41 | 3 | { |
|
| 42 | $this->from = $from; |
||
| 43 | return $this; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $to |
||
| 48 | 2 | * @return \SebastianFeldmann\Git\Command\DiffTree\ChangedFiles |
|
| 49 | */ |
||
| 50 | 2 | public function toRevision(string $to): ChangedFiles |
|
| 51 | 2 | { |
|
| 52 | $this->to = $to; |
||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Return the command to execute. |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | 2 | * @throws \RuntimeException |
|
| 61 | */ |
||
| 62 | 2 | protected function getGitCommand(): string |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Return the from commit id to diff |
||
| 69 | * |
||
| 70 | 2 | * @return string |
|
| 71 | */ |
||
| 72 | 2 | protected function getVersionsToCompare(): string |
|
| 75 | } |
||
| 76 | } |
||
| 77 |