Code Duplication    Length = 8-8 lines in 2 locations

src/Databases/PostgreSql.php 1 location

@@ 106-113 (lines=8) @@
103
        return implode(':', $contents);
104
    }
105
106
    protected function guardAgainstIncompleteCredentials()
107
    {
108
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
109
            if (empty($this->$requiredProperty)) {
110
                throw CannotStartDump::emptyParameter($requiredProperty);
111
            }
112
        }
113
    }
114
115
    protected function getEnvironmentVariablesForDumpCommand(string $temporaryCredentialsFile): array
116
    {

src/Databases/MySql.php 1 location

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