Code Duplication    Length = 4-4 lines in 2 locations

src/string.php 2 locations

@@ 229-232 (lines=4) @@
226
            return false;
227
        }
228
229
        foreach ((array)$needles as $needle) {
230
            if ($needle != '' && strpos($haystack, $needle) === 0) {
231
                return true;
232
            }
233
        }
234
        return false;
235
    }
@@ 248-251 (lines=4) @@
245
     */
246
    function str_contains($haystack, $needles)
247
    {
248
        foreach ((array)$needles as $needle) {
249
            if ($needle != '' && strpos($haystack, $needle) !== false) {
250
                return true;
251
            }
252
        }
253
        return false;
254
    }