Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | final class Url |
||
11 | { |
||
12 | /** |
||
13 | * Filter an url |
||
14 | * |
||
15 | * Filters value as URL (according to » http://www.faqs.org/rfcs/rfc2396) |
||
16 | * |
||
17 | * The return value is the url, as expected by the \TraderInteractive\Filterer class. |
||
18 | * By default, nulls are not allowed. |
||
19 | * |
||
20 | * @param mixed $value The value to filter. |
||
21 | * @param bool $allowNull True to allow nulls through, and false (default) if nulls should not be allowed. |
||
22 | * |
||
23 | * @return string|null The passed in $value. |
||
24 | * |
||
25 | * @throws FilterException if the value did not pass validation. |
||
26 | */ |
||
27 | public static function filter($value, bool $allowNull = false) |
||
45 |