Code Duplication    Length = 5-5 lines in 2 locations

src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location

@@ 287-291 (lines=5) @@
284
        $this->ensureBucketExists();
285
286
        $options = array();
287
        if ((string) $prefix != '') {
288
            $options['prefix'] = $this->computePath($prefix);
289
        } elseif (!empty($this->options['directory'])) {
290
            $options['prefix'] = $this->options['directory'];
291
        }
292
293
        $list = $this->service->objects->listObjects($this->bucket, $options);
294
        $keys = array();

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 267-271 (lines=5) @@
264
    public function listKeys($prefix = '')
265
    {
266
        $options = ['Bucket' => $this->bucket];
267
        if ((string) $prefix != '') {
268
            $options['Prefix'] = $this->computePath($prefix);
269
        } elseif (!empty($this->options['directory'])) {
270
            $options['Prefix'] = $this->options['directory'];
271
        }
272
273
        $keys = [];
274
        $iter = $this->service->getIterator('ListObjects', $options);