@@ -36,8 +36,9 @@ |
||
| 36 | 36 | |
| 37 | 37 | public static function removeSubstring($string, $substrToRemove) { |
| 38 | 38 | $firstIndex = strpos($string, $substrToRemove); |
| 39 | - if ($firstIndex === FALSE) |
|
| 40 | - return $string; |
|
| 39 | + if ($firstIndex === FALSE) { |
|
| 40 | + return $string; |
|
| 41 | + } |
|
| 41 | 42 | $lastIndex = $firstIndex + strlen($substrToRemove); |
| 42 | 43 | $pre = substr($string, 0, $firstIndex); |
| 43 | 44 | $post = substr($string, $lastIndex); |