Code Duplication    Length = 5-5 lines in 2 locations

src/Databases/MongoDb.php 1 location

@@ 48-52 (lines=5) @@
45
     */
46
    protected function guardAgainstIncompleteCredentials()
47
    {
48
        foreach (['dbName', 'host'] as $requiredProperty) {
49
            if (strlen($this->$requiredProperty) === 0) {
50
                throw CannotStartDump::emptyParameter($requiredProperty);
51
            }
52
        }
53
    }
54
55
    /**

src/Databases/MySql.php 1 location

@@ 325-329 (lines=5) @@
322
323
    protected function guardAgainstIncompleteCredentials()
324
    {
325
        foreach (['userName', 'host'] as $requiredProperty) {
326
            if (strlen($this->$requiredProperty) === 0) {
327
                throw CannotStartDump::emptyParameter($requiredProperty);
328
            }
329
        }
330
331
        if (strlen($this->dbName) === 0 && ! $this->allDatabasesWasSetAsExtraOption) {
332
            throw CannotStartDump::emptyParameter('dbName');