Skip to content

Commit

Permalink
Update DbDumperFactory.php (#1842)
Browse files Browse the repository at this point in the history
  • Loading branch information
diadal authored Sep 23, 2024
1 parent f8de07c commit 500489f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Tasks/Backup/DbDumperFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static function createFromConnection(string $dbConnectionName): DbDumper

if ($dbDumper instanceof MySql) {
$dbDumper

Check failure on line 49 in src/Tasks/Backup/DbDumperFactory.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Spatie\DbDumper\Databases\MySql::setSkipSsl().

Check failure on line 49 in src/Tasks/Backup/DbDumperFactory.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Spatie\DbDumper\Databases\MySql::setSkipSsl().
->setSkipSsl($dbConfig['dump']['skip_ssl'] ?? false)
->setDefaultCharacterSet($dbConfig['charset'] ?? '')
->setGtidPurged($dbConfig['dump']['mysql_gtid_purged'] ?? 'AUTO');
}
Expand Down Expand Up @@ -124,7 +125,7 @@ protected static function callMethodOnDumper(DbDumper $dbDumper, string $methodN

protected static function determineValidMethodName(DbDumper $dbDumper, string $methodName): string
{
return collect([$methodName, 'set'.ucfirst($methodName)])
->first(fn (string $methodName) => method_exists($dbDumper, $methodName), '');
return collect([$methodName, 'set' . ucfirst($methodName)])
->first(fn(string $methodName) => method_exists($dbDumper, $methodName), '');
}
}

0 comments on commit 500489f

Please sign in to comment.