mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Take all Postgres platform classes into consideration
This commit is contained in:
@@ -58,9 +58,10 @@ final class OrphanVisitsCountTracker
|
||||
$conn = $em->getConnection();
|
||||
$platformClass = $conn->getDatabasePlatform();
|
||||
|
||||
match ($platformClass::class) {
|
||||
PostgreSQLPlatform::class => $this->incrementForPostgres($conn, $isBot),
|
||||
SQLitePlatform::class, SQLServerPlatform::class => $this->incrementForOthers($conn, $isBot),
|
||||
match (true) {
|
||||
$platformClass instanceof PostgreSQLPlatform => $this->incrementForPostgres($conn, $isBot),
|
||||
$platformClass instanceof SQLitePlatform || $platformClass instanceof SQLServerPlatform
|
||||
=> $this->incrementForOthers($conn, $isBot),
|
||||
default => $this->incrementForMySQL($conn, $isBot),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -64,9 +64,10 @@ final class ShortUrlVisitsCountTracker
|
||||
$conn = $em->getConnection();
|
||||
$platformClass = $conn->getDatabasePlatform();
|
||||
|
||||
match ($platformClass::class) {
|
||||
PostgreSQLPlatform::class => $this->incrementForPostgres($conn, $shortUrlId, $isBot),
|
||||
SQLitePlatform::class, SQLServerPlatform::class => $this->incrementForOthers($conn, $shortUrlId, $isBot),
|
||||
match (true) {
|
||||
$platformClass instanceof PostgreSQLPlatform => $this->incrementForPostgres($conn, $shortUrlId, $isBot),
|
||||
$platformClass instanceof SQLitePlatform || $platformClass instanceof SQLServerPlatform
|
||||
=> $this->incrementForOthers($conn, $shortUrlId, $isBot),
|
||||
default => $this->incrementForMySQL($conn, $shortUrlId, $isBot),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user