Total Complexity | 7 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class Cleaner |
||
10 | { |
||
11 | |||
12 | const INT = '\D'; |
||
13 | const FLOAT = self::INT . '\,\.'; |
||
14 | const CHARS_RUS = 'а-яё'; |
||
15 | const CHARS_ENG = 'a-z'; |
||
16 | |||
17 | private static function fixQuotes($value): string |
||
18 | { |
||
19 | return htmlspecialchars(addslashes($value), ENT_QUOTES); |
||
20 | } |
||
21 | |||
22 | private static function fixNewlines($value): string |
||
25 | } |
||
26 | |||
27 | private static function compileRegexp($line): string |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Cleanup the value |
||
34 | * |
||
35 | * @param string $value |
||
36 | * @param string $type |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public static function run(string $value, string $type = null) |
||
66 | } |
||
67 | |||
69 |