Code Duplication    Length = 5-5 lines in 2 locations

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'];

src/Backup/Sync/AmazonS3.php 1 location

@@ 127-131 (lines=5) @@
124
     */
125
    protected function validateConfig(array $config)
126
    {
127
        foreach (['key', 'secret', 'bucket', 'region', 'path'] as $option) {
128
            if (!Arr::isSetAndNotEmptyString($config, $option)) {
129
                throw new Exception('AWS S3 ' . $option . ' is mandatory');
130
            }
131
        }
132
    }
133
134
    /**