Code Duplication    Length = 12-13 lines in 2 locations

src/Suricate/Helper.php 2 locations

@@ 140-151 (lines=12) @@
137
    }
138
}
139
140
if (!function_exists('contains')) {
141
    function contains($haystack, $needles)
142
    {
143
        foreach ((array) $needles as $currentNeedle) {
144
            if (strpos($haystack, $currentNeedle) !== false) {
145
                return true;
146
            }
147
        }
148
149
        return false;
150
    }
151
}
152
153
if (!function_exists('startsWith')) {
154
    function startsWith($haystack, $needles)
@@ 153-165 (lines=13) @@
150
    }
151
}
152
153
if (!function_exists('startsWith')) {
154
    function startsWith($haystack, $needles)
155
    {
156
        foreach ((array) $needles as $currentNeedle) {
157
            if (strpos($haystack, $currentNeedle) === 0) {
158
                return true;
159
            }
160
        }
161
162
        return false;
163
    }
164
}
165
166
if (!function_exists('endsWith')) {
167
    function endsWith($haystack, $needles)
168
    {