Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 468-475 (lines=8) @@
465
    private function getFileContent(SplFileInfo $file, $needsCompress) {
466
        if ($needsCompress) {
467
            switch ($this->compression['algorithm']) {
468
                case 'gzip':
469
                    return gzcompress(
470
                        file_get_contents(
471
                            $file->getRealPath()
472
                        ),
473
                        (int)$this->compression['level'],
474
                        ZLIB_ENCODING_GZIP
475
                    );
476
                case 'deflate':
477
                    return gzcompress(
478
                        file_get_contents(
@@ 476-483 (lines=8) @@
473
                        (int)$this->compression['level'],
474
                        ZLIB_ENCODING_GZIP
475
                    );
476
                case 'deflate':
477
                    return gzcompress(
478
                        file_get_contents(
479
                            $file->getRealPath()
480
                        ),
481
                        (int)$this->compression['level'],
482
                        ZLIB_ENCODING_DEFLATE
483
                    );
484
            }
485
        }
486
        return fopen($file->getRealPath(), 'r');