diff options
author | Alex Bilbie <alex@alexbilbie.com> | 2012-06-02 12:11:08 +0200 |
---|---|---|
committer | Alex Bilbie <alex@alexbilbie.com> | 2012-06-02 12:11:08 +0200 |
commit | 773ccc318f2769c9b7579630569b5d8ba47b114b (patch) | |
tree | 6f6f5f7a1c5043a067df9cc6c0dce670d8b26880 /system/helpers/text_helper.php | |
parent | 48a2baf0e288accd206f5da5031d29076e130792 (diff) |
Replaced `==` with `===` and `!=` with `!==` in /system/helpers
Diffstat (limited to 'system/helpers/text_helper.php')
-rw-r--r-- | system/helpers/text_helper.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php index e4451ae81..8a1f01b51 100644 --- a/system/helpers/text_helper.php +++ b/system/helpers/text_helper.php @@ -51,7 +51,7 @@ if ( ! function_exists('word_limiter')) */ function word_limiter($str, $limit = 100, $end_char = '…') { - if (trim($str) == '') + if (trim($str) === '') { return $str; } @@ -258,7 +258,7 @@ if ( ! function_exists('word_censor')) foreach ($censored as $badword) { - if ($replacement != '') + if ($replacement !== '') { $str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/i", "\\1{$replacement}\\3", $str); } @@ -338,12 +338,12 @@ if ( ! function_exists('highlight_phrase')) */ function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>') { - if ($str == '') + if ($str === '') { return ''; } - if ($phrase != '') + if ($phrase !== '') { return preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open.'\\1'.$tag_close, $str); } @@ -464,7 +464,7 @@ if ( ! function_exists('word_wrap')) // If $temp contains data it means we had to split up an over-length // word into smaller chunks so we'll add it back to our current line - if ($temp != '') + if ($temp !== '') { $output .= $temp."\n".$line."\n"; } |