Conditions | 3 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 1 | public static function configureAPIURL($instance){ |
|
20 | 1 | if (strpos($instance,"http")===FALSE){ |
|
21 | 1 | $instance = "http://".$instance; |
|
22 | 1 | } |
|
23 | 1 | if (strpos($instance,"rest/v10")!==FALSE){ |
|
24 | 1 | $instance = str_replace("rest/v10", "", $instance); |
|
25 | 1 | } |
|
26 | 1 | return rtrim($instance, "/").self::API_URL; |
|
27 | } |
||
28 | |||
51 | } |