| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 25 | protected function generateBaseUrl($sourceUrl) |
|
| 26 | { |
||
| 27 | 25 | $sourceUrl = parse_url($sourceUrl); |
|
| 28 | 25 | $pos = strrpos($sourceUrl['path'], '.git'); |
|
| 29 | |||
| 30 | 25 | return sprintf( |
|
| 31 | 25 | '%s://%s%s', |
|
| 32 | 25 | $sourceUrl['scheme'], |
|
| 33 | 25 | $sourceUrl['host'], |
|
| 34 | 25 | $pos === false ? $sourceUrl['path'] : substr($sourceUrl['path'], 0, strrpos($sourceUrl['path'], '.git')) |
|
| 35 | 25 | ); |
|
| 36 | } |
||
| 37 | |||
| 59 |