Code Duplication    Length = 8-8 lines in 2 locations

src/Databases/MySql.php 1 location

@@ 298-305 (lines=8) @@
295
        return implode(PHP_EOL, $contents);
296
    }
297
298
    protected function guardAgainstIncompleteCredentials()
299
    {
300
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
301
            if (strlen($this->$requiredProperty) === 0) {
302
                throw CannotStartDump::emptyParameter($requiredProperty);
303
            }
304
        }
305
    }
306
}
307

src/Databases/PostgreSql.php 1 location

@@ 270-277 (lines=8) @@
267
        return implode(':', $contents);
268
    }
269
270
    protected function guardAgainstIncompleteCredentials()
271
    {
272
        foreach (['userName', 'dbName', 'host'] as $requiredProperty) {
273
            if ($this->$requiredProperty == '') {
274
                throw CannotStartDump::emptyParameter($requiredProperty);
275
            }
276
        }
277
    }
278
279
    /**
280
     * @param $temporaryCredentialsFile