@@ -88,7 +88,10 @@ |
||
| 88 | 88 | $otherLength = UTF8::strlen($otherStr, $this->encoding); |
| 89 | 89 | |
| 90 | 90 | // Return if either string is empty |
| 91 | - if ($strLength == 0 || $otherLength == 0) return $this->newSelf(''); |
|
| 91 | + if ($strLength == 0 || $otherLength == 0) |
|
| 92 | + { |
|
| 93 | + return $this->newSelf(''); |
|
| 94 | + } |
|
| 92 | 95 | |
| 93 | 96 | $len = 0; $end = 0; |
| 94 | 97 | $table = array_fill(0, $strLength + 1, array_fill(0, $otherLength + 1, 0)); |
@@ -53,11 +53,17 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function containsAll($needles, $caseSensitive = true) |
| 55 | 55 | { |
| 56 | - if (empty($needles)) return false; |
|
| 56 | + if (empty($needles)) |
|
| 57 | + { |
|
| 58 | + return false; |
|
| 59 | + } |
|
| 57 | 60 | |
| 58 | 61 | foreach ($needles as $needle) |
| 59 | 62 | { |
| 60 | - if (!$this->contains($needle, $caseSensitive)) return false; |
|
| 63 | + if (!$this->contains($needle, $caseSensitive)) |
|
| 64 | + { |
|
| 65 | + return false; |
|
| 66 | + } |
|
| 61 | 67 | } |
| 62 | 68 | |
| 63 | 69 | return true; |
@@ -77,11 +83,17 @@ discard block |
||
| 77 | 83 | */ |
| 78 | 84 | public function containsAny($needles, $caseSensitive = true) |
| 79 | 85 | { |
| 80 | - if (empty($needles)) return false; |
|
| 86 | + if (empty($needles)) |
|
| 87 | + { |
|
| 88 | + return false; |
|
| 89 | + } |
|
| 81 | 90 | |
| 82 | 91 | foreach ($needles as $needle) |
| 83 | 92 | { |
| 84 | - if ($this->contains($needle, $caseSensitive)) return true; |
|
| 93 | + if ($this->contains($needle, $caseSensitive)) |
|
| 94 | + { |
|
| 95 | + return true; |
|
| 96 | + } |
|
| 85 | 97 | } |
| 86 | 98 | |
| 87 | 99 | return false; |