Code Duplication    Length = 6-6 lines in 2 locations

src/Glob.php 2 locations

@@ 285-290 (lines=6) @@
282
     */
283
    public static function toRegEx($glob, $flags = 0)
284
    {
285
        if (!Path::isAbsolute($glob) && false === strpos($glob, '://')) {
286
            throw new InvalidArgumentException(sprintf(
287
                'The glob "%s" is not absolute and not a URI.',
288
                $glob
289
            ));
290
        }
291
292
        // From the PHP manual: To specify a literal single quote, escape it
293
        // with a backslash (\). To specify a literal backslash, double it (\\).
@@ 338-343 (lines=6) @@
335
     */
336
    public static function getStaticPrefix($glob, $flags = 0)
337
    {
338
        if (!Path::isAbsolute($glob) && false === strpos($glob, '://')) {
339
            throw new InvalidArgumentException(sprintf(
340
                'The glob "%s" is not absolute and not a URI.',
341
                $glob
342
            ));
343
        }
344
345
        $prefix = $glob;
346