Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -320,19 +320,19 @@ |
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |
324 | | - * Returns the number of times the text contains the word |
325 | | - * @return int |
| 324 | + * Returns true if the text contains the word |
| 325 | + * @return bool |
326 | 326 | */ |
327 | 327 | function match( $text ) { |
328 | | - return preg_match( $this->getRegex(), $text ); |
| 328 | + return (bool)preg_match( $this->getRegex(), $text ); |
329 | 329 | } |
330 | 330 | |
331 | 331 | /** |
332 | | - * Returns if the text starts with the word |
333 | | - * @return int |
| 332 | + * Returns true if the text starts with the word |
| 333 | + * @return bool |
334 | 334 | */ |
335 | 335 | function matchStart( $text ) { |
336 | | - return preg_match( $this->getRegexStart(), $text ); |
| 336 | + return (bool)preg_match( $this->getRegexStart(), $text ); |
337 | 337 | } |
338 | 338 | |
339 | 339 | /** |