Code Duplication    Length = 8-8 lines in 2 locations

src/Databases/PostgreSql.php 1 location

@@ 219-226 (lines=8) @@
216
        return implode(':', $contents);
217
    }
218
219
    protected function guardAgainstIncompleteCredentials()
220
    {
221
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
222
            if ($this->$requiredProperty == '') {
223
                throw CannotStartDump::emptyParameter($requiredProperty);
224
            }
225
        }
226
    }
227
228
    /**
229
     * @param $temporaryCredentialsFile

src/Databases/MySql.php 1 location

@@ 245-252 (lines=8) @@
242
        return implode(PHP_EOL, $contents);
243
    }
244
245
    protected function guardAgainstIncompleteCredentials()
246
    {
247
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
248
            if (strlen($this->$requiredProperty) === 0) {
249
                throw CannotStartDump::emptyParameter($requiredProperty);
250
            }
251
        }
252
    }
253
}
254