Code Duplication    Length = 10-10 lines in 2 locations

src/Support/Str.php 2 locations

@@ 210-219 (lines=10) @@
207
     * @param  string|string[]  $needles
208
     * @return bool
209
     */
210
    public static function endsWith($haystack, $needles)
211
    {
212
        foreach ((array) $needles as $needle) {
213
            if (substr($haystack, -strlen($needle)) === (string) $needle) {
214
                return true;
215
            }
216
        }
217
218
        return false;
219
    }
220
221
    /**
222
     * Cap a string with a single instance of a given value.
@@ 604-613 (lines=10) @@
601
     * @param  string|string[]  $needles
602
     * @return bool
603
     */
604
    public static function startsWith($haystack, $needles)
605
    {
606
        foreach ((array) $needles as $needle) {
607
            if ((string) $needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {
608
                return true;
609
            }
610
        }
611
612
        return false;
613
    }
614
615
    /**
616
     * Convert a value to studly caps case.