1 | <?php |
||
23 | class Sanitizer { |
||
24 | |||
25 | /** |
||
26 | * Any change to the content of its data files should be reflected in a |
||
27 | * version change (the version number does not necessarily correlate with |
||
28 | * the library version) |
||
29 | */ |
||
30 | const VERSION = '0.1.1'; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $string = ''; |
||
36 | |||
37 | /** |
||
38 | * @var null |
||
39 | */ |
||
40 | private $encoding = null; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | private $options = array(); |
||
46 | |||
47 | /** |
||
48 | * @since 0.1 |
||
49 | * |
||
50 | * @param string $string |
||
51 | */ |
||
52 | 20 | public function __construct( $string ) { |
|
58 | |||
59 | /** |
||
60 | * @since 1.0 |
||
61 | * |
||
62 | * @param string $name |
||
63 | * @param mixed $value |
||
64 | */ |
||
65 | 20 | public function setOption( $name, $value ) { |
|
73 | |||
74 | /** |
||
75 | * @since 0.1 |
||
76 | * |
||
77 | * @param integer $flag |
||
78 | */ |
||
79 | 1 | public function applyTransliteration( $flag = Transliterator::DIACRITICS ) { |
|
82 | |||
83 | /** |
||
84 | * @since 0.1 |
||
85 | * |
||
86 | * @param integer $flag |
||
87 | * |
||
88 | * @return array |
||
89 | */ |
||
90 | 11 | public function getTokens( $flag = Tokenizer::STRICT ) { |
|
93 | |||
94 | /** |
||
95 | * @since 0.1 |
||
96 | * |
||
97 | * @param StopwordAnalyzer $stopwordAnalyzer |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 8 | public function sanitizeBy( StopwordAnalyzer $stopwordAnalyzer ) { |
|
133 | |||
134 | /** |
||
135 | * @since 0.1 |
||
136 | */ |
||
137 | 5 | public function toLowercase() { |
|
140 | |||
141 | /** |
||
142 | * @since 0.1 |
||
143 | * |
||
144 | * @param integer $length |
||
145 | */ |
||
146 | 3 | public function reduceLengthTo( $length ) { |
|
158 | |||
159 | /** |
||
160 | * @see http://www.phpwact.org/php/i18n/utf-8#str_replace |
||
161 | * @since 0.1 |
||
162 | * |
||
163 | * @param string $search |
||
164 | * @param string $replace |
||
165 | */ |
||
166 | 1 | public function replace( $search, $replace ) { |
|
169 | |||
170 | /** |
||
171 | * @since 0.1 |
||
172 | * |
||
173 | * @return boolean |
||
174 | */ |
||
175 | 1 | public function containsJapaneseCharacters() { |
|
178 | |||
179 | /** |
||
180 | * @since 0.1 |
||
181 | * |
||
182 | * @return boolean |
||
183 | */ |
||
184 | 1 | public function containsKoreanCharacters() { |
|
187 | |||
188 | /** |
||
189 | * @since 0.1 |
||
190 | * |
||
191 | * @return boolean |
||
192 | */ |
||
193 | 1 | public function containsChineseCharacters() { |
|
196 | |||
197 | /** |
||
198 | * @since 0.1 |
||
199 | * |
||
200 | * @return string |
||
201 | */ |
||
202 | 6 | public function __toString() { |
|
205 | |||
206 | 20 | private function detectEncoding( $string) { |
|
209 | |||
210 | } |
||
211 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..