1 | <?php |
||
9 | class StringUtils { |
||
10 | |||
11 | /** |
||
12 | * @param string $sString |
||
13 | * @return string |
||
14 | */ |
||
15 | 1 | public static function br2nl($sString) { |
|
18 | |||
19 | /** |
||
20 | * @param string $sString |
||
21 | * @return string |
||
22 | */ |
||
23 | 1 | public static function stripTags($sString) { |
|
26 | |||
27 | /** |
||
28 | * @param string $sString |
||
29 | * @return string |
||
30 | */ |
||
31 | 1 | public static function stripEntities($sString) { |
|
34 | |||
35 | /** |
||
36 | * @param string $sString |
||
37 | * @param int $iTimes |
||
38 | */ |
||
39 | 1 | public static function _echo($sString, $iTimes = 1) { |
|
43 | |||
44 | /** |
||
45 | * @param string $sString |
||
46 | * @return string |
||
47 | */ |
||
48 | 1 | public static function stripScriptTags($sString) { |
|
51 | |||
52 | /** |
||
53 | * returns an end of line, based on the environment |
||
54 | * @return string |
||
55 | */ |
||
56 | 1 | public static function nl() { |
|
59 | |||
60 | /** |
||
61 | * Removes all extra spaces from a string |
||
62 | * @param string $sString |
||
63 | * @return string |
||
64 | */ |
||
65 | 1 | public static function allTrim($sString) { |
|
68 | |||
69 | /** |
||
70 | * @param string $sString |
||
71 | * @return string |
||
72 | */ |
||
73 | 1 | public static function encodeEntities($sString) { |
|
76 | |||
77 | /** |
||
78 | * @param string $sUri |
||
79 | * @return string |
||
80 | */ |
||
81 | 2 | public static function formatUri($sUri) { |
|
93 | |||
94 | /** |
||
95 | * @param string $sString |
||
96 | * @param int $iLength |
||
97 | * @param string $sEtc |
||
98 | * @return string |
||
99 | */ |
||
100 | 1 | public static function truncate($sString, $iLength, $sEtc = '...') { |
|
110 | |||
111 | /** |
||
112 | * @param int $val |
||
113 | * @param int $base |
||
114 | * @param string $chars |
||
115 | * @return string |
||
116 | */ |
||
117 | 1 | public static function baseEncode($val, $base = 62, $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') { |
|
127 | |||
128 | /** |
||
129 | * @param string $str |
||
130 | * @param int $base |
||
131 | * @param string $chars |
||
132 | * @return int |
||
|
|||
133 | */ |
||
134 | 1 | public static function baseDecode($str, $base = 62, $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') { |
|
144 | } |
||
145 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.