Code Duplication    Length = 8-8 lines in 2 locations

src/Databases/MySql.php 1 location

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

src/Databases/PostgreSql.php 1 location

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