| Conditions | 5 |
| Paths | 8 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public static function create($url, $foundOnUrl = null, int $id = null) |
||
| 20 | { |
||
| 21 | if (! $url instanceof UriInterface) { |
||
| 22 | $url = new Uri($url); |
||
| 23 | } |
||
| 24 | |||
| 25 | if ($foundOnUrl !== null && ! $foundOnUrl instanceof UriInterface) { |
||
| 26 | $foundOnUrl = new Uri($foundOnUrl); |
||
| 27 | } |
||
| 28 | |||
| 29 | $static = new static($url, $foundOnUrl); |
||
| 30 | |||
| 31 | if ($id !== null) { |
||
| 32 | $static->setId($id); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $static; |
||
| 36 | } |
||
| 37 | |||
| 54 |