Code Duplication    Length = 10-10 lines in 2 locations

src/Support/Str.php 2 locations

@@ 147-156 (lines=10) @@
144
     * @param  string|array  $needles
145
     * @return bool
146
     */
147
    public static function endsWith($haystack, $needles)
148
    {
149
        foreach ((array) $needles as $needle) {
150
            if (substr($haystack, -strlen($needle)) === (string) $needle) {
151
                return true;
152
            }
153
        }
154
155
        return false;
156
    }
157
158
    /**
159
     * Cap a string with a single instance of a given value.
@@ 515-524 (lines=10) @@
512
     * @param  string|array  $needles
513
     * @return bool
514
     */
515
    public static function startsWith($haystack, $needles)
516
    {
517
        foreach ((array) $needles as $needle) {
518
            if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {
519
                return true;
520
            }
521
        }
522
523
        return false;
524
    }
525
526
    /**
527
     * Convert a value to studly caps case.