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