Code Duplication    Length = 10-12 lines in 2 locations

web/ckfinder/core/connector/php/vendor/aws/aws-sdk-php/src/S3/StreamWrapper.php 1 location

@@ 653-664 (lines=12) @@
650
        return $client;
651
    }
652
653
    private function getBucketKey($path)
654
    {
655
        // Remove the protocol
656
        $parts = explode('://', $path);
657
        // Get the bucket, key
658
        $parts = explode('/', $parts[1], 2);
659
660
        return [
661
            'Bucket' => $parts[0],
662
            'Key'    => isset($parts[1]) ? $parts[1] : null
663
        ];
664
    }
665
666
    /**
667
     * Get the bucket and key from the passed path (e.g. s3://bucket/key)

web/ckfinder/core/connector/php/vendor/aws/aws-sdk-php/src/S3/Transfer.php 1 location

@@ 182-191 (lines=10) @@
179
     *
180
     * @return array
181
     */
182
    private function getS3Args($path)
183
    {
184
        $parts = explode('/', str_replace('s3://', '', $path), 2);
185
        $args = ['Bucket' => $parts[0]];
186
        if (isset($parts[1])) {
187
            $args['Key'] = $parts[1];
188
        }
189
190
        return $args;
191
    }
192
193
    /**
194
     * Parses the scheme from a filename.