Skip to content

Commit 6ec9f1f

Browse files
committed
Fix stan
1 parent e0e30e3 commit 6ec9f1f

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

composer.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Database/Connection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class Connection
2121
*/
2222
public static function hasDatabaseError(\Throwable $e): bool
2323
{
24+
/** @phpstan-ignore-next-line can't find static method */
2425
if (DetectsLostConnections::causedByLostConnection($e)) {
2526
return true;
2627
}

src/Database/PDO.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Utopia\Database;
44

5-
use Swoole\Database\DetectsLostConnections;
65
use Utopia\CLI\Console;
76

87
/**
@@ -45,7 +44,6 @@ public function __call(string $method, array $args): mixed
4544
try {
4645
return $this->pdo->{$method}(...$args);
4746
} catch (\Throwable $e) {
48-
/** @phpstan-ignore-next-line can't find static method */
4947
if (Connection::hasDatabaseError($e)) {
5048
Console::warning('[Database] Lost connection detected. Reconnecting...');
5149
$this->reconnect();

0 commit comments

Comments
 (0)