| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | 2 | public function generateTagHref(History $history, $prev, $curr) |
|
| 45 | { |
||
| 46 | 2 | $project = $history->getProject(); |
|
| 47 | 2 | $rmsSite = $history->getConfig()->rmsSite; |
|
| 48 | |||
| 49 | 2 | if ($history->isInitTag($curr)) { |
|
| 50 | 2 | if ($history->isLastTag($prev)) { |
|
| 51 | 1 | return "https://$rmsSite/$project/releases"; |
|
| 52 | } |
||
| 53 | |||
| 54 | 1 | return "https://$rmsSite/$project/releases/tag/$prev"; |
|
| 55 | } |
||
| 56 | 1 | if ($history->isLastTag($prev)) { |
|
| 57 | 1 | $prev = 'HEAD'; |
|
| 58 | 1 | } |
|
| 59 | |||
| 60 | 1 | return "https://$rmsSite/$project/compare/$curr...$prev"; |
|
| 61 | } |
||
| 63 |