Code Duplication    Length = 8-8 lines in 2 locations

src/Databases/MySql.php 1 location

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

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