diff --git a/src/Connection.php b/src/Connection.php index 7f7ca11..7baa385 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -21,16 +21,16 @@ class Connection public static function new(...$args) : Connection { if ($args[0] instanceof PDO) { - return new static($args[0]); + return new Connection($args[0]); } - return new static(new PDO(...$args)); + return new Connection(new PDO(...$args)); } public static function factory(...$args) : callable { return function () use ($args) { - return static::new(...$args); + return Connection::new(...$args); }; } diff --git a/src/ConnectionLocator.php b/src/ConnectionLocator.php index 37b1198..de44950 100644 --- a/src/ConnectionLocator.php +++ b/src/ConnectionLocator.php @@ -39,12 +39,12 @@ class ConnectionLocator public static function new(...$args) { if ($args[0] instanceof Connection) { - return new static(function () use ($args) { + return new ConnectionLocator(function () use ($args) { return $args[0]; }); } - return new static(Connection::factory(...$args)); + return new ConnectionLocator(Connection::factory(...$args)); } public function __construct(