@@ -5260,19 +5260,26 @@ |
||
| 5260 | 5260 | array $needles, |
| 5261 | 5261 | bool $caseSensitive = true |
| 5262 | 5262 | ): bool { |
| 5263 | - if ($haystack === '' || $needles === []) |
|
| 5264 | - return false; |
|
| 5263 | + if ($haystack === '' || $needles === []) { |
|
| 5264 | + return false; |
|
| 5265 | + } |
|
| 5265 | 5266 | |
| 5266 | 5267 | /** @noinspection LoopWhichDoesNotLoopInspection */ |
| 5267 | 5268 | foreach ($needles as &$needle) { |
| 5268 | - if (!$needle) continue; |
|
| 5269 | + if (!$needle) { |
|
| 5270 | + continue; |
|
| 5271 | + } |
|
| 5269 | 5272 | |
| 5270 | 5273 | if ($caseSensitive) { |
| 5271 | - if (strpos($haystack, $needle) !== false) return true; |
|
| 5274 | + if (strpos($haystack, $needle) !== false) { |
|
| 5275 | + return true; |
|
| 5276 | + } |
|
| 5272 | 5277 | continue; |
| 5273 | 5278 | } |
| 5274 | 5279 | |
| 5275 | - if (mb_stripos($haystack, $needle) !== false) return true; |
|
| 5280 | + if (mb_stripos($haystack, $needle) !== false) { |
|
| 5281 | + return true; |
|
| 5282 | + } |
|
| 5276 | 5283 | } |
| 5277 | 5284 | |
| 5278 | 5285 | return false; |