Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public static function stringNormalise($string) |
||
8 | { |
||
9 | $string = html_entity_decode( |
||
10 | preg_replace( |
||
11 | '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', |
||
12 | '$1', |
||
13 | htmlentities($string) |
||
14 | ), |
||
15 | ENT_QUOTES, |
||
16 | 'UTF-8' |
||
17 | ); |
||
18 | return preg_replace('/[^A-z0-9]/', '_', mb_strtolower($string)); |
||
19 | } |
||
20 | } |
||
21 |