Code Duplication    Length = 5-5 lines in 2 locations

src/Publiux/laravelcdn/Providers/AwsS3Provider.php 2 locations

@@ 314-318 (lines=5) @@
311
        if ($this->getCloudFront() === true) {
312
            $url = $this->cdn_helper->parseUrl($this->getCloudFrontUrl());
313
314
            if (array_key_exists('scheme', $url)) {
315
                return $url['scheme'].'://'.$url['host'].'/'.$path;
316
            } else {
317
                return '//'.$url['host'].'/'.$path;
318
            }
319
        }
320
321
        $url = $this->cdn_helper->parseUrl($this->getUrl());
@@ 326-330 (lines=5) @@
323
        $bucket = $this->getBucket();
324
        $bucket = (!empty($bucket)) ? $bucket.'.' : '';
325
326
        if (array_key_exists('scheme', $url)) {
327
            return $url['scheme'].'://'.$bucket.$url['host'].'/'.$path;
328
        } else {
329
            return '//'.$bucket.$url['host'].'/'.$path;
330
        }
331
    }
332
333
    /**