Code Duplication    Length = 10-10 lines in 2 locations

src/Support/Str.php 2 locations

@@ 122-131 (lines=10) @@
119
     * @param  string|array  $needles
120
     * @return bool
121
     */
122
    public static function endsWith($haystack, $needles)
123
    {
124
        foreach ((array) $needles as $needle) {
125
            if (substr($haystack, -strlen($needle)) === (string) $needle) {
126
                return true;
127
            }
128
        }
129
130
        return false;
131
    }
132
133
    /**
134
     * Cap a string with a single instance of a given value.
@@ 470-479 (lines=10) @@
467
     * @param  string|array  $needles
468
     * @return bool
469
     */
470
    public static function startsWith($haystack, $needles)
471
    {
472
        foreach ((array) $needles as $needle) {
473
            if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {
474
                return true;
475
            }
476
        }
477
478
        return false;
479
    }
480
481
    /**
482
     * Convert a value to studly caps case.