Code Duplication    Length = 5-5 lines in 2 locations

src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location

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

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 263-267 (lines=5) @@
260
        $this->ensureBucketExists();
261
262
        $options = ['Bucket' => $this->bucket];
263
        if ((string) $prefix != '') {
264
            $options['Prefix'] = $this->computePath($prefix);
265
        } elseif (!empty($this->options['directory'])) {
266
            $options['Prefix'] = $this->options['directory'];
267
        }
268
269
        $keys = [];
270
        $iter = $this->service->getIterator('ListObjects', $options);