Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 12 | public function createUri($uri = '') |
|
15 | { |
||
16 | 12 | if (!is_string($uri)) { |
|
17 | 3 | throw new InvalidArgumentException(sprintf( |
|
18 | 3 | 'URI passed to constructor must be a string; received "%s"', |
|
19 | 3 | (is_object($uri) ? get_class($uri) : gettype($uri)) |
|
20 | )); |
||
21 | } |
||
22 | |||
23 | 9 | return new Uri($uri); |
|
24 | } |
||
25 | } |
||
26 |