Skip to content

Commit d934b99

Browse files
committed
Fix stan
1 parent 63083ec commit d934b99

File tree

2 files changed

+32
-11
lines changed

2 files changed

+32
-11
lines changed

composer.lock

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

src/Database/PDO.php

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

33
namespace Utopia\Database;
44

5+
/**
6+
* A PDO wrapper that forwards method calls to the internal PDO instance.
7+
*
8+
* @mixin \PDO
9+
*/
510
class PDO
611
{
712
protected \PDO $pdo;
813

14+
/**
15+
* @param string $dsn
16+
* @param ?string $username
17+
* @param ?string $password
18+
* @param array<mixed> $config
19+
*/
920
public function __construct(
1021
protected string $dsn,
1122
protected ?string $username,
@@ -20,11 +31,21 @@ public function __construct(
2031
);
2132
}
2233

34+
/**
35+
* @param string $method
36+
* @param array<mixed> $args
37+
* @return mixed
38+
*/
2339
public function __call(string $method, array $args): mixed
2440
{
2541
return $this->pdo->{$method}(...$args);
2642
}
2743

44+
/**
45+
* Create a new connection to the database
46+
*
47+
* @return void
48+
*/
2849
public function reconnect(): void
2950
{
3051
$this->pdo = new \PDO(

0 commit comments

Comments
 (0)