Code Duplication    Length = 3-3 lines in 2 locations

src/string.php 2 locations

@@ 173-175 (lines=3) @@
170
     */
171
    function ends_with($haystack, $needles)
172
    {
173
        if ($haystack === null || $haystack == '' || $needles === null || $needles == '') {
174
            return false;
175
        }
176
177
        foreach ((array)$needles as $needle) {
178
            if ((string)$needle === substr($haystack, -strlen($needle))) {
@@ 196-198 (lines=3) @@
193
     */
194
    function starts_with($haystack, $needles)
195
    {
196
        if ($haystack === null || $haystack == '' || $needles === null || $needles == '') {
197
            return false;
198
        }
199
200
        foreach ((array)$needles as $needle) {
201
            if ($needle != '' && strpos($haystack, $needle) === 0) {