Code Duplication    Length = 8-8 lines in 2 locations

src/Databases/MySql.php 1 location

@@ 203-210 (lines=8) @@
200
        return implode(PHP_EOL, $contents);
201
    }
202
203
    protected function guardAgainstIncompleteCredentials()
204
    {
205
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
206
            if (strlen($this->$requiredProperty) === 0) {
207
                throw CannotStartDump::emptyParameter($requiredProperty);
208
            }
209
        }
210
    }
211
}
212

src/Databases/PostgreSql.php 1 location

@@ 178-185 (lines=8) @@
175
        return implode(':', $contents);
176
    }
177
178
    protected function guardAgainstIncompleteCredentials()
179
    {
180
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
181
            if ($this->$requiredProperty == '') {
182
                throw CannotStartDump::emptyParameter($requiredProperty);
183
            }
184
        }
185
    }
186
187
    /**
188
     * @param $temporaryCredentialsFile