Skip to content

Commit 56f58fa

Browse files
committed
Update name
1 parent 6ec9f1f commit 56f58fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Database/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Connection
1919
* @param \Throwable $e
2020
* @return bool
2121
*/
22-
public static function hasDatabaseError(\Throwable $e): bool
22+
public static function hasError(\Throwable $e): bool
2323
{
2424
/** @phpstan-ignore-next-line can't find static method */
2525
if (DetectsLostConnections::causedByLostConnection($e)) {

src/Database/PDO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __call(string $method, array $args): mixed
4444
try {
4545
return $this->pdo->{$method}(...$args);
4646
} catch (\Throwable $e) {
47-
if (Connection::hasDatabaseError($e)) {
47+
if (Connection::hasError($e)) {
4848
Console::warning('[Database] Lost connection detected. Reconnecting...');
4949
$this->reconnect();
5050
return $this->pdo->{$method}(...$args);

0 commit comments

Comments
 (0)