Code Duplication    Length = 5-5 lines in 2 locations

src/Backup/Sync/AmazonS3.php 1 location

@@ 102-106 (lines=5) @@
99
        }
100
101
        // check for mandatory options
102
        foreach (['key', 'secret', 'bucket', 'region', 'path'] as $option) {
103
            if (!Arr::isSetAndNotEmptyString($config, $option)) {
104
                throw new Exception('AWS S3 ' . $option . ' is mandatory');
105
            }
106
        }
107
108
        $this->key             = $config['key'];
109
        $this->secret          = $config['secret'];

src/Backup/Sync/SoftLayer.php 1 location

@@ 74-78 (lines=5) @@
71
            throw new Exception('SoftLayer SDK not loaded: use composer to install "softlayer/objectstorage"');
72
        }
73
        // check for mandatory options
74
        foreach (['user', 'secret', 'container', 'host', 'path'] as $option) {
75
            if (!Arr::isSetAndNotEmptyString($config, $option)) {
76
                throw new Exception('SoftLayer ' . $option . ' is mandatory');
77
            }
78
        }
79
80
        $this->user      = $config['user'];
81
        $this->secret    = $config['secret'];