| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function doValidate(&$uri, $config, $context) |
||
| 31 | { |
||
| 32 | $uri->userinfo = null; |
||
| 33 | $uri->host = null; |
||
| 34 | $uri->port = null; |
||
| 35 | |||
| 36 | // Delete all non-numeric characters, non-x characters |
||
| 37 | // from phone number, EXCEPT for a leading plus sign. |
||
| 38 | $uri->path = preg_replace('/(?!^\+)[^\dx]/', '', |
||
| 39 | // Normalize e(x)tension to lower-case |
||
| 40 | str_replace('X', 'x', $uri->path)); |
||
| 41 | |||
| 42 | return true; |
||
| 43 | } |
||
| 44 | } |
||
| 47 |