| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 4 | public function fixPackage($pkg) |
|
| 25 | { |
||
| 26 | 4 | $pkg->spk_url = $this->urlPrefix . $pkg->spk; |
|
| 27 | |||
| 28 | // Make absolute URLs from relative ones |
||
| 29 | 4 | $thumbnail_url = array(); |
|
| 30 | 4 | foreach ($pkg->thumbnail as $i => $t) { |
|
| 31 | 4 | $thumbnail_url[$i] = $this->urlPrefix . $t; |
|
| 32 | 4 | } |
|
| 33 | 4 | $pkg->thumbnail_url = $thumbnail_url; |
|
| 34 | |||
| 35 | 4 | $snapshot_url = array(); |
|
| 36 | 4 | foreach ($pkg->snapshot as $i => $s) { |
|
| 37 | 4 | $snapshot_url[$i] = $this->urlPrefix . $s; |
|
| 38 | 4 | } |
|
| 39 | 4 | $pkg->snapshot_url = $snapshot_url; |
|
| 40 | 4 | } |
|
| 41 | |||
| 54 |